Material transition design for android -
i have application consists of 1 activity , 1 fragment inside it. let's name fragment a. fragment consists of 3 buttons btna, btnb , btnc. when click on btna in fragment a, fragment b replace fragment a. inside fragment b, have 3 buttons btnd, btne, btnf. i'm thinking of making use of material transition , having following animations:
i wanted backward compatible @ least android api 14. have researched , i'm making use of transitions-everywhere. doesn't appear can fragment-fragment transition using though. thought of using other methods instead. here ways think job:
- make activity-activity instead (this seems little overkill i'm reusing stuffs in activity)
- make in 1 activity , use scenes bring buttons in:
- have 6 buttons in activity.
- have 3 buttons in activity , when click on btna, proceed change btna, btnb, btnc btnd, btne, btnf.
so how should design be? there particular consideration need take? i'm more in favor of option 2.1 i.e. 6 buttons in 1 activity wasn't sure if recommended approach. recommendations?
thanks in advance!
i author of transitions-everywhere, maybe can help. real reasons use different fragments in case? fragment transitions not backported now, doesn't have free time this.
you can perform transition way:
transitionset transitionset = new transitionset(); transitionset.addtransition(new slide(gravity.bottom)); transitionset.addtransition(new changebounds()); transitionmanager.begindelayedtransition(buttonscontainer, transitionset); btna.setlayoutparams(new viewgroup.layoutparams(viewgroup.layoutparams.match_parent, viewgroup.layoutparams.match_parent)); btnb.setvisibility(view.gone) btnc.setvisibility(view.gone)
Comments
Post a Comment