i use Actionbarsherlock for my App and i like to switch the Actionbar Overlay Mode in my Code.
I have 2 Fragments (one is a Mapview where i want a translucent Actionbar) the other is a ListFragment where a solid Actionbar is needed.
i tryed
requestWindowFeature((int) Window.FEATURE_ACTION_BAR & ~Window.FEATURE_ACTION_BAR_OVERLAY);
problem with this is that requesting Features only works before content is added.
i using this style to accomplish the transparent Actionbar
<style name="TransparentActionbar" parent="@style/Theme.Sherlock" xmlns:android="http://schemas.android.com/apk/res/android">
<item name="windowActionBarOverlay">true</item>
<item name="windowActionModeOverlay">true</item>
<item name="abBackground">#96000000</item>
<item name="abDivider">@null</item>
</style>
is there a way to set
<item name="windowActionBarOverlay">true</item>
<item name="windowActionModeOverlay">true</item>
to false inside the Activity/Fragment?
Edit: Sadly it doesnt work for Actionbarsherlock and a ListFragment from the Compatibility Package.
Top Margin is added to the Bottom Margin for some reason. Left and Right Margin working fine inside the LayoutListener.
Found a solution for this Problem in an Android Developer Example