views:

2380

answers:

3

Which are the default dimension of the Home wallpaper/background for the various Android screen configurations (small, normal and large screens with low, medium and high density)?

Are 9-patch PNG files supported for the wallpaper? Should I be using these instead?

I found a method in API level 5 that gives you the minimum size of the wallpaper, but I would like to support previous versions of Android as well.

Thanks!

A: 
Christopher
Thanks for the swift reply. However, at least the backgrounds that come with the device are larger than the screen resolution. This allows the background to move when you swipe left or right on the home screen and change the page.I believe the height matches the screen resolution, but not the width, which is equal or larger to the biggest dimension, as the background moves both in portrait and landscape mode.
hgpc
Oops, quite right.. I was going to say that you need to have a background with at least the biggest dimension squared. I have an HTC Hero which doesn't do landscape on the home screen, so I haven't really investigated how the swipe/width issue is handled.
Christopher
+3  A: 

A wallpaper is twice as wide as the device held in portrait mode. So 960x800 on a Nexus One, 960x854 on a Droid, 640x480 on a G1/Magic/Hero, etc.

Romain Guy
Thanks Romain! Nice to see Google's Android developers here.
hgpc
A: 

Hi , Can you guys please provide us with a small sample code that sets as a wallpaper a drawable that we have in res folder , thanks a lot !

Amine
Welcome to stackoverflow, Amine. You should ask a separate question, not reply to one.
hgpc