So we've successfully stripped ActionBarSherlock from the Zappos app in favor of the new ActionBarCompat and it works great on Honeycomb+ but on Gingerbread the action bar expands to fill the whole screen and I cannot figure out why it's happening. We basically just changed all the themes/styles/references to ActionBarSherlock to be the equivalents in ActionBarCompat. Below is a screen shot of the issue. Anyone else run across this on GB and know of a fix? It's holding up a release for us :\
Alright so I figured it out finally... we had copied the appcompat source code as a library project rather than using the com.android.support:appcompat-v7:18.0.+ dependency in gradle. After switching to the dependency in gradle and removing the appcompat source from our project it works as intended now.
Here's answer to the problem: http://gmariotti.blogspot.com.br/
It was just add this:
dependencies {
compile 'com.android.support:appcompat-v7:18.0.+'
}
I faced a similar problem where the actionbar filled the entire screen when I went from using ActionBar AppCombat to use ActionBarSherlock. In the value-v11 folder style.xml file. I had to remove the ActionBar Style there that inherit from the ActionBar appCombat.
I also had this problem. The issue was that my themes definitions for Gingerbread were pointing to a style that didn't exist.
I had this in values/themes.xml
:
<item name="actionBarStyle">@style/mytheme_solid_ActionBar</item>
But this mytheme_solid_ActionBar
was only defined in values-v11/styles.xml
and values-v14/styles.xml
.
I just had to add it to values/styles.xml
so that Gingerbread devices would have a proper style defined for the action bar (which inherits from Widget.AppCompat.Light.ActionBar.Solid.Inverse
).
My problem was the parent that my custom actionBarStyle was inheriting from.
<style name="AppTheme" parent="AppBaseTheme">
<item name="actionBarStyle">@style/sfActionBar</item>
<item name="android:actionBarStyle">@style/sfActionBar</item>
</style>
My custom style was originally:
<style name="sfActionBar" parent="Widget.Sherlock.ActionBar">...</style>
The change to get it to work on everything but Gingerbread was:
<style name="sfActionBar" parent="@android:style/Widget.ActionBar">...</style>
The correct modification:
<style name="sfActionBar" parent="@style/Widget.AppCompat.ActionBar">...</style>
Once I had similar issue (Toolbar's color filled the whole screen on Gingerbread) and the solution was to remove android:clipChildren="false"
from the Toolbar's parent view.
© 2022 - 2024 — McMap. All rights reserved.