Is it possible to style the Android Tabhost to look like that of the iPhone? If not, is there any open source code that can show how to create Bottom Tabs for Andoid ?
Is it possible to style the Android Tabhost to look like that of the iPhone? If not, is there any open source code that can show how to create Bottom Tabs for Andoid ?
You'll need to build this control yourself. Few options:
use RadioGroup and put custom radio buttons there and customize hell of it.
build this control from scratch, inherit it from one of the layouts ( Frame, Relative, Linear ) and build the behavior you need.
You can also take TabHost src, and use it as a base for your control
Your screenshot has the android 1.6. style. If you are using a tabhost on a newer version and simply put it on the bottom of the screen it will look very much like the iphone version.
I wouldn't change to much at the UI of android simply give it a resemblance to the iphone look and feel(same icons) and stay with the rest in the android style. This will make the app look familiar to the users.
To achieve the same look for the icons just use an xml definition of you drawable with a selected and a not selected state of the button like it looks on the iphone. To set an icon use the setIndicator method of the tabspec.
You can somewhat style the tabhost by setting a background or a style for the tabwidget. But the actual inner part of the widget will be drawn above you style and background