There was a question of the need to rewrite the application under the Fragments API. The Avtivity
contains only Avtivity
, and each is responsible only for one screen and will not contain several, as in the example SDK. Is it necessary to rewrite, so that each activity contains only one fragment, or now there should be one activity, and all screens should be rewritten into fragments that will be managed by this one activity? In general, it is not clear whether it is worth touching anything at all, and if so, how the application should now be organized.
|
2 answers
Well, if you need to - rewrite, in general, fragments are recommended to be used for tablet screens, i.e. more than 10 "and they are made as a convenient way to manage the free space of the screen, i.e. in some places where it seems to be correct, you need to use them, somewhere it is better to create a new activation and switch to it ...
- What structure should the application have then? For each activity your fragment? or one activity, and remake all the others? - Dimitry
- It depends on the usability of the application, in the fragments you can put the menu for navigation, some elements related to activation. - Gorets
|
If in the future you plan to adapt your application also for tablets (the same application will have different screen layouts for smartphones and tablets), then the answer is unequivocal, yes, we MUST move on to fragments. If the answer is negative, then you should not start rewriting the working application.
|