I have my layouts like below:
Layout 1 : I have a LinearLayout(parent – horizontal).
Layout 2 & 3: I have two more layouts(2 and 3) side by side in Layout 1.
In Layout 2 (left side), I have a couple of buttons(button 1 and button 2). What I am looking for?
Whenever I click on button1 or button2 – I want to switch the right side layout which is 3 (complete layout – not like changing TextView and all) ( as in the TableLayout`) between some layout 4 and layout 5.
Make layout 4 & 5 children of layout3 and take a look at
ViewFlipperto switch between the views. Or, take a look atViewPagerif you want to swipe between views.You can have support for ViewPager (and other >=3.0 features, including fragments) on pre 3.0-devices using the Android Compatibility library.
If you want fuller ActionBar support on earlier devices, you can use ActionBarSherlock (which extends the compatibility package).