0

I am working on an Android game.

I finally got my app on two devices besides the emulator and realized that even though I have different sized images in the "drawable-hdpi", "...-mdpi", etc folders, they're always the same size. The same goes for my widgets (Buttons, ImageViews).

I was wondering if there's another way to adapt to the different screen sizes? My game is just loading them as Bitmaps when the images are being used and unloading them when they're done.

Also, why aren't my widgets resizing even though I used "dip" in the layout xmls?

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141
corgichu
  • 2,580
  • 3
  • 32
  • 46

1 Answers1

2

When you qualify your images with -hdpi, -mdpi, -ldpi, you support different densities.

If you want to distinguish between screen sizes, you must qualify your drawables with -small, -normal, -large and -xlarge.

At Supporting Multiple Screens is an article about this issue, describing screen size, screen density and resolution.

Olaf Dietsche
  • 72,253
  • 8
  • 102
  • 198