[英]Resizing images to look the same across all devises without losing quality
[英]Resizing an image to look the same across all devices
我閱讀了http://developer.android.com/guide/practices/screens_support.html ,我只了解了一些內容。 所以,我有一個帶有android:src = "@drawable/logo"
的ImageView android:src = "@drawable/logo"
。 logo.png放在我的res/drawable-mdpi
,其image-size
為100x100像素。
我應該在以下文件夾中將圖像保存在哪個維度,因此它在所有設備的屏幕尺寸方面看起來都相同?:
- res/drawable-ldpi
- res/drawable-hdpi
- res/drawable-xhdpi
- res/drawable-xxhdpi
簡單的事情。 是75x75,150x150,200x200,300x300,正確答案? 我也應該在圖像編輯器中更改像素/英寸嗎?
神奇的數字是3:4:6:8:12。 這些是您應該用於l:m:h:xh:xxh -dpi圖像資源的比例。 例如,您的啟動器圖標應為
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.