How To Create A Tab-like Ui In Android?
I'm trying to implement a Tab-like UI inside an activity. This is how I want it to be. There are 3 button which each is associated with a LinearLayout. When the user clicks on a bu
Solution 1:
Better you go with tab widget if still you want to do manually you can do as follows:
- Create one Relative layout (root)
- create one linear layout with property width fill parent height wrap content and give wight 3
- place 3 buttons in linear layout with 1 1 1weigth
- Take 3 relative layouts for every tab like button make sure that these 3 are aligned above/below of button layout
- on click event of every button set vissibility of each relative layout i full fill u r need
Solution 2:
What you need is the TabHost View : http://developer.android.com/reference/android/widget/TabHost.html
Here is a tutorial : http://www.androidhive.info/2011/08/android-tab-layout-tutorial/
Post a Comment for "How To Create A Tab-like Ui In Android?"