Actionbarsherlock Stacked Action Bar Styling Issue

ActionBarSherlock stacked action bar styling issue

I will accept anyone with an answer that involves keeping ActionBarSherlock, however, I removed this library and now I am just using the support libraries and am no longer having that spacing issue. I guess there might be an issue with ActionBarSherlock. But since it is no longer being supported I think the best solution is just to use the Support libraries.

ActionBar Divider Styling

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.

Styling ActionBar Sherlock

It's because you are applying the same original style in the manifest file android:theme="@style/Theme.Sherlock" which doesn't make any difference. You have prepared the custom style with name Theme.MyAppTheme, having parent as Theme.Sherlock. So, you need to declare your customized style(Theme.MyAppTheme) in your manifest file like android:theme="@style/Theme.MyAppTheme". Even you have to include without android prefix attributes too like below as the other answerer also said. Hope this helps. Even you can refer this too.

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

<style name="Theme.MyAppTheme.ActionBar" parent="Widget.Sherlock.ActionBar">
<item name="android:background">#222222</item>
<item name = "background">#222222</item>
<item name="android:height">64dip</item>
<item name="height">64dip</item>

<item name="android:titleTextStyle">@style/Theme.MyAppTheme.ActionBar.TitleTextStyle</item>
<item name="titleTextStyle">@style/Theme.MyAppTheme.ActionBar.TitleTextStyle</item>
</style>

<style name="Theme.MyAppTheme.ActionBar.TitleTextStyle" parent="TextAppearance.Sherlock.Widget.ActionBar.Title">
<item name="android:textColor">#fff</item>
<item name="textColor">#fff</item>
<item name="android:textStyle">bold</item>
<item name="textStyle">bold</item>
<item name="android:textSize">32sp</item>
<item name="textSize">32sp</item>
</style>

Styling the Actionbarsherlock tabs

The following should work

<style name="Theme.app" parent="@style/Theme.Sherlock.Light">
<item name="android:actionBarTabBarStyle">@style/Theme.app.tabbar.style</item>
<item name="actionBarTabBarStyle">@style/Widget.app.ActionBar.TabBar</item>
</style>

<style name="Theme.app.tabbar.style" parent="@style/Theme.Sherlock.Light">
<item name="android:background">#FF0000</item>
<item name="background">#FF0000</item>
</style>

<style name="Widget.app.ActionBar.TabBar" parent="Widget.Sherlock.ActionBar.TabBar">
<item name="android:background">#FF0000</item>
<item name="background">#FF0000</item>
</style>

This makes the tabBar red.

You need to set two times the actionBarTabBarStyle. This is because of Android > 3.0 and Android <3.0

ActionBarSherlock - remove the app icon in the Action View (and other styling issues)

Well, I found a workaround the icon issue, but I don't really like it. There should be away to make it go away all together in the search mode...

For now, I just set transparent color as an icon drawable:

getSupportActionBar().setIcon(android.R.color.transparent);

Still looking for better ideas though!



Related Topics



Leave a reply



Submit