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 activity1 hosts list of items in listview. in oncreate() 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 (setting transitionname , 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 carddetailsfragment which, many of should've guessed, derived dialogfragment.

    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

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -