ActionBar Divider Styling

后端 未结 1 1990
忘了有多久
忘了有多久 2020-12-14 05:05

\"foursquare

I have two questions. Before detailing these questions, I want to add I\'m using

相关标签:
1条回答
  • 2020-12-14 05:41

    the attribute you are looking for is:

    <style name="Theme.Example" parent="Theme.Sherlock">
        <item name="actionBarDivider">@drawable/small_detail_divider</item>
        ....
        <item name="android:actionBarDivider">@drawable/small_detail_divider</item>
        ...
    </style>
    

    Just to give you some more info.

    The split ActionBar should be set with:

    <style name="Theme.Example" parent="Theme.Sherlock">
        <item name="actionBarSplitStyle">@style/Widget.Styled.ActionBarSplit</item>
        <item name="android:actionBarSplitStyle">@style/Widget.Styled.ActionBarSplit</item>
        ...
    

    Then provide your custom style for the split action bar..

    Thrid question: Adding in order:

    When you add the menu item pragmatically use: Menu

    menu.add (0, R.id.menu_new_ab_item, 0, "Item");

    The order determines how you order your menu items.

    You can be more specific in your menu.xml files android:orderInCategory="1..n" can be any int. I normally start at 10 or so, so I can inflate items in-front of the standard items.

    0 讨论(0)
提交回复
热议问题