berserk
berserk

Reputation: 2728

Add a view below actionbarsherlock

I am using actionbarsherlock in my app. I want to add a view below the actionbar. See the following screenshot: enter image description here

I want to add the 4-colored strip to the actionbar. How to do this?

Upvotes: 0

Views: 32

Answers (1)

joao2fast4u
joao2fast4u

Reputation: 6892

You can do that by creating a CustomView for your ActionBar.

Then you just got to do this:

getSupportActionBar().setDisplayShowCustomEnabled(true);
getSupportActionBar().setCustomView(R.layout.my_custom_view);

See more in here

Edit: Actually, you can do it using:

getSupportActionBar().setBackgroundDrawable(getResources().getDrawable(R.drawable.background_action_bar));

Your drawable is something like this:

action bar background

Upvotes: 1

Related Questions