How to switch or change between tabs in android sdk graphic layout?

I am trying to change or switch between the two tabs that I have in the eclipse graphic layout so that I can see the elements in another tab. Is it possible? the only way I could do this is to make the second tab, briefly the first, as it is shown when viewing the layout in this way.

Sorry if this question was asked before, but I searched on Google here too before I posted.

+7
source share
3 answers

What you can do is move each tabcontent to its own XML file - say: tab1.xml and tab2.xml .

Then, when you added them to your layout using TabHost and TabWidget , you use the include tag instead:

 <include layout="@layout/tab1" /> <include layout="@layout/tab2" /> 

Thus, you can view each Tab as its own layout and not worry about switching tabs in the graphical layout editor.

+8
source

As I know, there is no way to change the selected tab - for example, there are no other types - flags. The only way is to change the parameters and see the result.

0
source

Ok, so I made a mistake to understand the question. You can drag the toolbar and place it where you want ...

If this is not an answer, indicate in detail what you want to know for sure

-2
source

All Articles