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.
kaspermoerch
source share