android - Using Lollipop's Transition API on a DialogFragment -
i've been reading multiple sources on how implement lollipop's transition animation seamlessly move between activities , fragments.
that said, can't seem make work dialogfragment.
here's i've tried far:
i've
activity1hosts list of items inlistview. inoncreate()method, i've made request enable transitions:@override protected void oncreate(final bundle savedinstancestate) { super.oncreate(savedinstancestate); getwindow().setsharedelementexittransition(transitioninflater.from(this) .inflatetransition(r.transition.change_bounds_shared_element)); ...i've built (and assigned) custom adapter in way listen click events , notified item being clicked
view. used information compose transition (settingtransitionname, whatnot) such this:... @override public void oncardclicked(final view view, final card card) { view.settransitionname("rootlayout"); final carddetailsfragment fragment = carddetailsfragment.newinstance(card); fragment.setsharedelemententertransition(transitioninflater.from(cardflowactivity.this) .inflatetransition(r.transition.change_bounds_shared_element)); ...lastly, made call show
carddetailsfragmentwhich, many of should've guessed, deriveddialogfragment.fragment.show(getsupportfragmentmanager(), "detailed_card_view_" + card.getid());
but alas, didn't worked way expecting be. there's not animation save default fade-in one.
am missing something? or nature of dialogfragment can't used alongside new transition api?
Comments
Post a Comment