I’m running my app from SDK directly on my phone connected with the computer. Is there any way to determine (using the SDK tools) which dpi drawables folder is actually used to display specific png file in the app?
Edit:
To make it clear. I figured myself how to get this information using other methods:
1. putting different files under the same names in different dpi folders
2. write w short piece of code to check it programmatically
The real question now is: can I get this information directly in SDK (DDMS or Hierarchy Viewer)?
You cannot find which drawable folder is being used But you can able to find which Density is used.
then you can use metrics.densityDpi to find which DPI is used. it will be DENSITY_DEFAULT, DENSITY_HIGH, DENSITY_LOW, DENSITY_MEDIUM, etc. you can compare and find out.
If it is
DENSITY_HIGH – drawable-hdpi
DENSITY_LOW = drawable-ldpi
DENSITY_MEDIUM – drawable-mdpi
See here for Documentation http://developer.android.com/reference/android/util/DisplayMetrics.html