views:

25

answers:

2

Hi.. I'm new to android,I'm using tabHost adding some tabs to it,its working quite fine but when i rotate my device in landscape mode it also work there fine but i don't need tab bar there because it covers much space and i also have google ads so both of them cover half of the screen and leave a little space for user to interact.All i need is a solution to somehow hide tab bar just like we can do it in iphone to make a bit room for user to interact.I need some solution urgent.Thanks

+1  A: 

The simplest way would be to create a second version of your layout.xml file which doesn't include the TabHost and put it in a resource folder named 'layout-land' (the 'land' suffix is short for 'landscape'). Please see this SDK article for more information.

Reuben Scratton
Well my activity xml doesn't include tabhost my xml is simple but my activity is loading from tabhost activity.So how can I solve this issue even i have my activity xml without tabhost,I need to solve this issue soon your suggestion was good i also thought on that.I tell you what I'm doing.I have a tab.xml which only includes tabhost,tabwidget and this xml is loaded in myTabAC extends tabactivity from here i set my tabs and call other activities on each tab,but all other activities don't use tabhost in their xml.Your help would be very useful for me and other people who might having same issue
Muhammad imran
A: 

Apart from doing what Reuben is telling you would be to animate the transition between both so that the change would be a bit smoother.

Moss