Hey, since Im new to Android I am now thinking on what is the correct way of doing things.
As it stands, the application Im writing has 4 different screens: * Screen 1 - list of nodes (main screen) * Screen 2 - options menu, tableLayout with buttons * Screen 3 - navigation * Screen 4 - text details on version etc
These screens can be navigated to/from using a "header" View that is places on top. the header then has 4 different buttons:
+--------------------+
| menu with buttons |
+--------------------+
| |
| |
| |
| C O N T E N T |
| |
| |
| |
+--------------------+
main.xml is really just a LinearLayout that INCLUDES the header.xml and then the content, in that case the list of nodes in a ListView
options.xml is the same thing almost, it includes the headerxml and then a bunch of buttons...
...and so on with the two other screens.
So, when I press one of the buttons in the header/menu on top the content should be switched to that screen. My question is:
Should I create one Activity for each screen? I read on Google that:
An activity presents a visual user interface for one focused endeavor the user can undertake.
So that can be interpretet that I shoukd use one Activity for each of these screens.Should I not create more Activitys than the startup, and then just run the setContentView(R.layout.whatever) when I want to change the "content" above?
Regards