Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
282 views
in Technique[技术] by (71.8m points)

android - How to change color of Selected Tab

How to change color of tab when its selected, see below screen shot:

i am showing Orange color in ActionBar, in a same way i wanna show orange color in place of light blue.

To show Orange color in ActionBar background, i am using below code:

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">

    <style name="Theme.MyAppTheme" parent="android:style/Theme.Holo.Light">
         <item name="android:actionBarStyle">@style/Theme.MyAppTheme.ActionBar</item>
    </style>

   <style name="Theme.MyAppTheme.ActionBar" parent="android:style/Widget.Holo.Light.ActionBar">
        <item name="android:background">#FF4444</item>
    </style>

</resources>
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I really recommend you to use the Actionbar Style Generator.

With that tool you can easily theme your graphic elements in your toolbar.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...