Jaans
Jaans

Reputation: 141

dimension of image background for android actionbar

I want to design an image background for my android app's action bar, but have no idea what dimension I have make so that it fits in different screen resolution. Do I need to design the same image background separately for each screen densities? I want to design it in photoshope is that a good option?

any idea Please !

Upvotes: 0

Views: 142

Answers (2)

Denys Kravchenko
Denys Kravchenko

Reputation: 26

Create 3 .png versions of the image, for hdpi/xhdpi/xxhdpi densities.

Upvotes: 0

Azae B. Garcia
Azae B. Garcia

Reputation: 476

I would suggest you use a gradient which you can store in the drawable folder

<shape xmlns:android="http://schemas.android.com/apk/res/android" >

    <gradient 
        android:startColor="#00445a"
        android:endColor="#00699a"
        android:angle="90"
        android:type="linear"

        />

</shape>

This will prevent all the trouble of trying to adapt to screen sizes.

Upvotes: 1

Related Questions