-1

I have resource folders for images in -hdpi, -xhdpi, and others. I use DP units in my layout. But on my Galaxy Nexus (resolution of 1280x720), it uses the resources from the -hdpi folder. Also, the size of the layout is wrong (e.g. I have 45dp -- on the HTC Desire (resolution of 800x480) it is 67px, but on the Galaxy Nexus (resolution of 1280x720) I also get 67px.

What is my mistake?

Kevin Coppock
  • 133,643
  • 45
  • 263
  • 274
Tim
  • 1,606
  • 2
  • 20
  • 32
  • While you're correct in this instance that the Galaxy Nexus is XHDPI, don't make the mistake of correlating screen resolution with density. A 1280x720 10" tablet would *not* be XHDPI. – Kevin Coppock Jul 11 '12 at 16:46

1 Answers1

2

See this answer for more on the Galaxy Nexus and the layout.

The Galaxy Nexus is a -xhdpi and should use that folder accordingly. You may want to double check that you have in fact put the right size icon in the xhdpi folder.

Sometimes in my experience the icons don't refresh unless you do a full clean install i.e. manually uninstall the app and then reinstall from Eclipse. That way it will force the icon to refresh.

Also I have had to do a project->clean before to have the R file update with the new values but this was a less common fix versus uninstall / reinstall method.

Community
  • 1
  • 1
Nick
  • 9,285
  • 33
  • 104
  • 147
  • That I remember, I'm always able to solve it with a project clean. FWIW, on the latest SDKs, I've noticed that it happens less and less often than it used to. – davidcesarino Jul 11 '12 at 16:21
  • One other way is to select any resource folder and hit F5 to refresh, then follow up by modifying and saving any open file (forcing a build) then run again. Works for me and is a little quicker than cleaning. I actually don't even know if the second step is necessary. – Kevin Coppock Jul 11 '12 at 16:43