Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - iphone style tabhost [closed]

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 Android ?

alt text
(source: appshopper.com)
alt text

like image 966
Soni Ali Avatar asked Apr 20 '10 18:04

Soni Ali


2 Answers

I would suggest you guys to not change the default look and feel of the tabs, because users on android devices have their own user experience, and you will negate that past experience, so don't force them to learn new tabs experience (because users on mobile are so lazy to learn new things, usually they rely on their past experience.)

See Pure Android for more.

However if you want to go ahead, I've customized the default Android Tabs to be look like iPhone tabs. Which is simple and features default Android tabs' ui components (̶T̶a̶b̶H̶o̶s̶t̶, ̶T̶a̶b̶W̶i̶d̶g̶e̶t̶).

Download link: GitHub, Iphone-Tab-in-Android

This sample has been upgraded to use TabLayout and ViewPager

Relavent Blog entry can be found here:

iPhone like Tabs in Android.

The screenshot:

tabs at bottom screenshot

I have also cutomized the tabhost to look like Raised Center Tab.

Raised Center Screenshot

to download RaiseCenterTab, please go here GitHub: RaisedCenterTab.

like image 188
Adil Soomro Avatar answered Oct 05 '22 14:10

Adil Soomro


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

like image 30
Alex Volovoy Avatar answered Oct 05 '22 15:10

Alex Volovoy