我把图像作为按钮的背景.但我不知道我应该在Photoshop中为所有三个文件夹drawable-hdpi,drawable-ldpi和drawable-mdpi创建多大的图像尺寸?
谢谢.
解决方法
如果您的buttom图像是纯色背景,如果它可以是可伸缩图像,则使用
9-Patch
工具创建位图.
否则,请阅读Android开发者网站上的Alternate Drawables
部分:
To create alternative bitmap drawables for different densities,you
should follow the 3:4:6:8 scaling ratio between the four generalized
densities. For example,if you have a bitmap drawable that’s 48×48
pixels for medium-density screen (the size for a launcher icon),all
the different sizes should be:36×36 for low-density
48×48 for medium-density
72×72 for high-density
96×96 for extra high-density