android - To what extent should my app use fragments? -
i have working app not have fragments.
but devbytes says if you're not using fragments in application making big mistake.
the api guides says add multiple fragments screen avoid switching activities
from assume should always use fragments.
in app have activities a, b, c , d
a map activity in show markers , info in infowindow.
b has same information a using listview, can show more information each item have user.
c details of selected item. user can c either a or b
d activity (outside of flow)
although don't use fragments today, seems reasonable convert a , b fragments can reused if day decide show a , b side side in tablet (even though it's done without fragments).
so question is: should turn c activity fragments it's part of flow? (even if don't plan reuse activity) , if answers yes, should turn d fragment , have 1 app 1 activity , 4 fragments?
thanks time.
you should use fragments. if don't, you're adding future development time , decreasing future flexibility. may not need use fragments right now, doing pay off in spades. keep simple mimicking google's own simplesinglepaneactivity. allow implement phone ui first, while making tablet ui simpler implement time in future.
Comments
Post a Comment