# ICS Tabs on Gingerbread devices?



## ermacwins (Jan 19, 2012)

Hi

How does one get ICS tabs to show on Gingerbread apps? I know it can be done because I've seen it on some apps. What files needs to be changed/edited to to achive this?

Here is the GB Tab










And here is ICS Tabs on a GB device


----------



## JBirdVegas (Jun 11, 2011)

Are both of those the same tab object just different API versions?


----------



## JBirdVegas (Jun 11, 2011)

Derp nope haha... OK your going to needed to roll your own... Google did the work for you just find the updated Tabs class and layout pull them into your project directly and call that version instead of the API version included with the device.

EDIT for references:

refs on Google's code:
https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/widget/TabWidget.java
https://developer.android.com/reference/android/widget/TabWidget.html

or you could use a lib to do the heavy lifting:
http://viewpagerindicator.com/
sample app using said lib
https://github.com/JakeWharton/Android-ViewPagerIndicator/tree/master/sample


----------

