Took me quite some time to finally solve this. I know that many developers do not want their tabs to look like the one in the first photo where there is an extra space at the top. Even I did not like how this looks like. All the forums I have gone through never gave any correct answer.

I will get straight to the point so you can apply this to your app right away. The attribute that needs to be modified is the padding. Simply call the method below and your tabs will not display any extra space on its top.

At some point in your TabHost, you may want to call some methods found in your Activity classes. You can actually but not by instantiating the Activity class.

Using the LocalActivityManager class, you can get a reference to the activity object using this code.

From there, you can call the method. Just make sure it is set to public ;). Oh yeah, be sure you have your tag variables as global so you can get access to those spec tabs anywhere, anytime in case you want to gain access to your Activity classes.

Related Posts Plugin for WordPress, Blogger...