Setting ActionBarSherlock Theme for Android app

后端 未结 7 1316
深忆病人
深忆病人 2020-12-01 10:04

READ UPDATE 2 BELOW FOR THE ANSWER

I\'m trying to use ActionBarSherlock in my app. I checked out the 4.0.0 release from the project github repo, bui

7条回答
  •  臣服心动
    2020-12-01 10:52

    If you wanna use custom style, I made a template for custom ActionBarSherlock style. Theme is defined in /values/styles.xml file. It is extended from Theme.Sherlock.Light theme. There are many parameters, you can set: icon, logo, divider, title, shadow overlay, action menu buttons, popup menu, action mode background, dropdown list navigation, tab style, display options etc. Almost everything, what you need, to create your custom action bar theme. I use this template in my apps, because it helps me to style action bar very quickly.

    You can find this template on my GitHub. It is very easy to use. Just copy values and drawable directiories into your project and set android:theme parameter in application element in AndroidManifest.xml:

    
    

    Drawables in my template were generated via Android Action Bar Style Generator. I use different naming convention for resources. This simple script renames all resources generated with Android Action Bar Style Generator to my own convention, used in the template.

提交回复
热议问题