Skip to content Skip to sidebar Skip to footer

Make Actionbar Overlay Using Actionbarsherlock

The last few days I've been doing great stuff in development, but I've seem to have hit a wall on something probably stupid simple. It's annoying. I was hoping I could get some hel

Solution 1:

OK, so apparently, with my set-up, you can't do it using themes.

I ended it up doing it, globally like this.

setTheme(theme.whatever);
requestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
super.onCreate(savedInstanceState);
setContentView(R.layout.content);
getSupportActionBar().setBackgroundDrawable(getResources().getDrawable(R.drawable.color)); // This is #212121 solid color for the dark action bar.

The lines are spread out over my code, but this is the gist of it. The order is important.

I also found out that sliding menu seemed to be blocking the overlay mode. I had to remove the instance for it to work. I'm still looking for a way to enable both overlay mode and the sliding menu.

Post a Comment for "Make Actionbar Overlay Using Actionbarsherlock"