views:

54

answers:

1

Hi!

Im the kinda of android developer thats fascinated with good looking tabs. Probably the best one ive seen so far is the one from the GoWalla app.

Does anyone have some initial thoughts about how they achieved that look?

Thanks

+1  A: 

If your question is about the icons, a tab's icon can be a StateListDrawable:

<selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
    <item
        android:state_selected="true"
        android:state_pressed="false"
        android:drawable="@drawable/foo_when_selected"
    />
    <item
        android:drawable="@drawable/foo_normal"
    />
</selector>

Then, you can use different PNGs for the selected versus normal cases (red-orange versus gray in the GoWalla example).

CommonsWare
Its not the icons. What are they using as a background? The android gradient class or a image file? When you click theres not that orange strip color. I saw something related using reflection (?), not sure. That you can change/remove the strip color!
Philipz
You can apply `android:background` to the `TabWidget`. I do not know what you mean by "that orange strip color".
CommonsWare
Check this out: http://knol.google.com/k/fred-grott/advance-tabs/166jfml0mowlh/41#
Philipz