![enter image description here][1]
I want to make a tab layout application, in which there are four tabs. Now I would like to set multiple layouts in one tab.
For example, the example below of a tab layout they make four tabs,
Now in the first tab (Timeline) make a button that give next page link,
press next button and other layout display in the first tab (timeline tab). So what thing do I need to do?
You have to use the ActivityGroup. Read Android tabactivity nested activities, and you will get what you want.
Related
I wish to show tabs in an activity such that one of the tabs will be a comment form and the other tab will be a list of comments submitted by other users of the application.
I do not wish to implement it as a TabActivity - where the whole screen is occupied by the view, with the tabs at the top. I wish to show this tab interface below a image both of which will be in a <LinearLayout android:orientation="vertical">.
How do I accomplish this?
You can give a layout to TabActivity where you have LinearLayout on the top as you desired and then the tabs
I am developing an application in android for which i have to use nine tabs in the main layout.
But all tabs in one view doesn't look nice.So i decided to show five tabs in one view and other four on click of one of the tabs.But it is not working when i click the fifth tab to show the other four tabs can you suggest me to set all tabs in my application in a better gui.
Thanx in Advance
i have develop one application in which tab layout in main file now i would like to set tablayout inside 2nd number tab,so what thing can i do? help me.
its "tab inside tab"
I think you want to give sub-options while clicking on 2nd tab button. For that, why dont you create layout with 2-3 options as you wants. And make it visible/invisible based on the 2nd button's click.
You can make visible/invisible any view by using setVisibility(View.VISIBLE) and setVisibility(View.GONE) method.
I suppose you can't embed a TabHost inside another TabHost. You can do what #Paresh said. Implement your own view switching. If you want an entire Activity embedded - take a look at ActivityGroup or the Fragments framework which you can use through the Compatibility Framework. Good luck.
I have a problem in layout.
I am using TabHost in my application. In that there are 4 Tabs.
In one of the Tab i have used 3 Buttons.
What I wanted to do is :
When i click on one of the Button, the TabHost and the Button should remain as it is and it should display me the contents (Set according to onClickListener) in that activity itself.
Take a look at the answer of this question: Changing the view within the Android Tab Widget
Ok, but the thing i don't understand: where should it show you the buttonClick result? If you want to set the activity in tab not to reload each time, you should use .addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP) in the corresponding tabspec declaration
I use Tab Widget like in documentation example TabWidget
I have two tabs, and in every tab when I press some button I need to load another different activity. My question is how to achive that I have that two tab on another activities like headers ?
I could create that tabs in new activities but it wouldn't remember choosen activity for another tab. How to solve this ?
This is not possible out of the box. The normal TabHost doesn't provide any facility to change the content of a tab after it is created. If you can use views as your tab content, you can, however, flip between the views within a tab so that to get the effect you are after.
If you absolutely must use a new Activity, then you will have to implement your own TabHost which allows swapping tab content after it is created.