Saturday, June 18, 2016

Android: What are the application-icon-* in aapt dump badging?

Question:
When running aapt dump badging, there is a list of application-icon.*
application-icon-120:'res/drawable-ldpi-v4/icon.png'
application-icon-160:'res/drawable-mdpi-v4/icon.png'
application-icon-213:'res/drawable-tvdpi-v4/icon.png'
application-icon-240:'res/drawable-hdpi-v4/icon.png'
application-icon-320:'res/drawable-xhdpi-v4/icon.png'
application-icon-480:'res/drawable-xxhdpi-v4/icon.png'
application-icon-640:'res/drawable-xxxhdpi-v4/icon.png'


What are those numbers 120, 160, 213...etc.?

Answer:
Each number represent a screen density, e.g.
120 = DENSITY_LOW = ldpi
160 = DENSITY_MEDIUM = mdpi
213 = DENSITY_TV = tvdpi

...etc.


Ref:
DisplayMetrics | Android Developers

No comments: