Change line color in tabs - ActionBarSherlock

牧云@^-^@ 提交于 2019-12-04 06:06:08

A few things:

You don't really need <style name="AppTheme" parent="android:Theme.Light" /> anymore unless you want to change it to inherit Theme.Sherlock and use it for your app theme. If you decide to do this you will have to use Theme.MyTheme for activities.

Either way, to fix the problem you want to change

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/Theme.Sherlock" >

to

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/Theme.MyTheme" >

OR you can apply the theme directly to your activities:

 <activity 
    android:name="com.awesome.package.activity.SomeActivity"
    android:theme="@style/Theme.MyTheme"/>

Side note, I recommend this excellent actionbar theme generator

Set in your manifest file theme as follows:

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/Theme.MyTheme" >

It will preserve all Sherlock themes and will add your custom styles.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!