Android Application Stream

I am creating an Android application that has many different screens, where the user can go to these screens using the buttons or list presented on these screens. What would be the best way to develop an entire application navigation flow? Do I have to display each screen for viewing or action? Can a project create an Android application with only one activity and many views, where each view is a single screen with many other user interface elements (buttons, lists, images, etc.).

+3
source share
2 answers

I suggest that you use a new action for each “screen” that is significantly different from another screen (both for the appearance and for the data associated with it). This gives you easier control, and you don’t need to mess up your code with a lot of variables to define different states. Using various actions, you usually do not need to worry about starting in an unwanted or even undefined state.

To exchange data between actions, you can use putExtra () to add “simple” data to INTENTor for more complex data, you can extend Application and use this instance as a singleton, which you can then get through(MyApplication)getApplication();

+5
source

. - java- 1 - " ". , " ". "", , Activity.

, , , . .

+4

Source: https://habr.com/ru/post/1722768/


All Articles