Android App Icon Resource ID of specific density

207 Views Asked by At

How can I get (int) resource-id of specific density (hdpi, xhdpi, etc) of the app-icon in Android?

I know we can get drawable object of specific density using getDrawableForDensity() method, but how to get resource id of this drawable?

1

There are 1 best solutions below

0
On

Android doesn't need you to do this. Each device density is automatically referenced once you add the resources. However, you should use vector drawables where necessary.