简体   繁体   中英

Android 9patch image

When 9patch png images are used, do we need to provide them in xhdpi, hdpi and mdpi format also or only one resolution is enough? Because either way they will resize on resolution... or am I thinking something wrong?

您应该使用不同的大小,否则LDPI设备上的边框看起来比XHDPI设备上的边框粗得多

对于九个补丁图像,仅一个分辨率就足够了,因为9补丁图像会根据布局缩放图像文本。

Nine-patches are widely used for background kind of images: most typically it would be some sort of border and a fill. You should provide only one resolution of 9patch, Android would scale it appropriately.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM