开发者

Tabs very dark on API level 5, but used to be lighter with API level 4?

I've been using开发者_如何学JAVA API level 4, and I am moving to level 5. I had a tab widget in my activity. The tabs used to be pretty light greys. After moving to API level 5, they are quite dark. The unselected tabs are almost black! I've tried setting the theme to light, but the colors remain very dark. What is the reason for this?


Images for the tabs can be found under SDK res folders for all the SDK levels you've downloaded. So you can open them up and compare. If the goal is to preserve the look of the application, I would style the tabs.

EDIT: You can modify and use this drawable

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <!-- Non focused states -->
    <item android:state_focused="false" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/tab_unselected" />
    <item android:state_focused="false" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/tab_selected" />

    <!-- Focused states -->
    <item android:state_focused="true" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/tab_focus" />
    <item android:state_focused="true" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/tab_focus" />

    <!-- Pressed -->
    <item android:state_pressed="true" android:drawable="@drawable/tab_press" />
</selector>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜