2

Got this really stupid problem:
Can find the proper name for the android folder for WVGA800 resources.

I've created a folder for WVGA854: drawable-normal-long-hdpi
It worked totally fine.
For WVGA800 I've tried 'drawable-normal-notlong-hdpi' - emulator and handset still gets resources from
'drawable', not even 'drawable-normal-long-hdpi'.
Tried using 'drawble-hdpi', 'drawable-notlong-hdpi' - nothing works, it keeps using 'drawable' for resources.

How should the folder for WVGA800 be named?

UPD:
Using
supports-screens android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"/>
Didnt solve the problem.
Is there a way to debug what resource folder is used and why?

Jin35
  • 8,602
  • 3
  • 32
  • 52
AAverin
  • 3,014
  • 3
  • 27
  • 32
  • Really strange behavior. WVGA800 emulator keeps using 'drawable' sources, BUT Samsung Galaxy S (480x800) for some reason uses 'drawable-normal-long-hdpi'. Why? It should get 'drawable-notlong' or 'drawable-normal-notlong-hdpi' – AAverin Oct 29 '10 at 10:40

2 Answers2

2

Android is not like the iPhone. In iPhone it works to make full-screen images for the two supported resolutions, and rely on that. In Android, it doesn't work. There are too many resolutions, and more can come out any day of the week. The solution, then, is to really make the layouts and images device independent. Sometimes this requires creative solutions, but in any case it requires a change in thinking.

For example, we were trying to solve this same problem for a full-screen splash page. We had a logo, a gradient, and a set of objects at the bottom of the picture. The solution for us was to split these three things, allow the gradient to be stretched, and then position the logo in the center, and the objects at the bottom. This is the type of solution that is required in Android, and it will save you from having to cut a different graphic for every resolution.

You can also try nine-patch images for some of this. This would have worked great for our case except for the fact that the image included a gradient.

Micah Hainline
  • 14,367
  • 9
  • 52
  • 85
0

All seems correct, except you did a spelling mistake: "drawble". Check your directory names.

I suggest you try a more permissive resource filter first. Separate your assets in drawable-long and drawable-notlong, and see if it works.

DavGin
  • 8,205
  • 2
  • 19
  • 26
  • 'drawble' - just mistyped=) Also already have a folder 'drawable-notlong', still, emulator gets res from 'drawable' – AAverin Oct 29 '10 at 09:18
  • This isn't going to work. long is anything with an aspect ratio > 1.5. Aspect ratio for 800x480 is 800/480 ~= 1.67. Both resolutions are marked 'long' – Micah Hainline Jun 03 '11 at 15:16
  • so what's the solution? I've got the same problem however we need to differentiate the actual dimens.xml for each of these screen sizes. – dropsOfJupiter Apr 17 '12 at 23:09