Android: Image button size for multiple screen sizes but with same density

439 views Asked by At

I am writing an Android app to have a matrix of image buttons. I tested it with 2 devices: Galaxy Note 1 (5.3") and Galaxy tab 8.0 (8.00 "). When the source images are put in different density drawable folders, both devices took the images from hdpi folder. However the screen sizes are different. Buttons displayed correctly on tab 8.0 but too big on Note 1 (buttons are not all shown).

In this case, what is a better approach for this. Thx a lot.

1

There are 1 answers

0
Mycoola On

Galaxy tab 8 is kind of tablets & its density as Galaxy Note one so you should put Galaxy tab image in

// for Phones drawable-ldpi drawable-mdpi drawable-hdpi

//for 7 inch tablets drawable-large-mdpi drawable-large-hdpi(for Nexus 7)

// for 10 inch tablets drawable-xlarge-mdpi

reference : this answer