Saeid
Saeid

Reputation: 2321

Actionbar background

it's possible that change action-bar background with custom image?

Upvotes: 0

Views: 152

Answers (2)

spm
spm

Reputation: 80

i try this code & work right :

BitmapDrawable bg =(BitmapDrawable)getResources().getDrawable(R.drawable.ic_launcher); // get the image as bitmap drawable
bg.setTileModeXY(TileMode.REPEAT, TileMode.CLAMP); // set the TileMode.
getActionBar().setBackgroundDrawable(bg);

Upvotes: 1

frenziedherring
frenziedherring

Reputation: 2265

https://developer.android.com/training/basics/actionbar/styling.html

You can set background drawables using themes

Upvotes: 2

Related Questions