Reputation: 762
I'm developing an app in Android, and since I'm using a dark background, the checkboxes are not visible so I need to use a drawable, I have created a 45 x 45 px image, if I test it in a Nexus 5, the image looks big, and it looks bigger in a lower resolution phone, this is the output:
https://i.sstatic.net/UjBDV.png
What's the recommended size for a drawable checkbox? how can I fit it accordingly to different resolutiones? thank you!
EDIT:
Thanks to the suggestions I ended up using a 9patch image, however, I want to double check if my assumption is correct, since I need to resize the whole checkbox, the boundaries should be on the edges of the images right? I'm not selecting the transparent area:
Would that be ok? I already tested it in a Nexus 5 and in an emulator (320 x 480), and it looks ok, just double checking, thanks!
Upvotes: 2
Views: 712
Reputation: 8163
Here is information about sizes in Android: http://developer.android.com/design/style/metrics-grids.html
So good size is about 32dp for CheckBox
and you can make the image 9-patch. So minimum pixel size gets automatically scaled to fit and look good.
For pixel sizes check this: http://developer.android.com/design/style/iconography.html
Upvotes: 1