My main layout is like this:
~~~~~~~~~~
~~~~~~~~~~
----------
[][][][][]
Bottom side is fixed, top side is changing whenever a button is clicked. Using 2 different linear layouts for top and bottom, and a different Activity for every button at the bottom. Actually it’s working, but I’m not sure if it’s the right way. I feel like I’m overusing Activities.
Should I be going back and forth in Activities for this kind of setup? Or is there a better way to solve this issue?
The answer is given by Singularity: fragments
http://developer.android.com/guide/components/fragments.html
A Fragment represents a behavior or a portion of user interface in an Activity. You can combine multiple fragments in a single activity to build a multi-pane UI and reuse a fragment in multiple activities. You can think of a fragment as a modular section of an activity, which has its own lifecycle, receives its own input events, and which you can add or remove while the activity is running (sort of like a “sub activity” that you can reuse in different activities).