Nima Sakhtemani
Nima Sakhtemani

Reputation: 1119

What is the proper size of an image to be used in imagebutton?

I have 5 Images designed to look like a button and I'd like to use them within ImageButton(s) in my android project. The size of my images are 662 x 128.

I know that I have to resize the images to place them into ldpi,mdpi,hdpi,xhdpi folders but what I don't know is what width and height should I use and change my image into.

For example for xhdpi what size should the width and height of the image (not the ImageButton)?

I use photoshop for my photo editing.

UPDATE: I currently develop my app for phone.

Upvotes: 0

Views: 100

Answers (2)

James andresakis
James andresakis

Reputation: 5415

First you should find out what screen density and size your test device is. Then make your image resource perfect for that resolution and density. then use siruk's suggestion to properly size your resources for the other densities

Upvotes: 1

Siruk Viktor
Siruk Viktor

Reputation: 514

It all depends on what the screen to pick a picture 662 x 128. Diaper rash with it, and follow this line of proportions: ldpi (0.75), mdpi (1), hdpi (1.5), xhddpi (2), xxhddpi(3).

Upvotes: 1

Related Questions