Android wallpaper/background dimensions

前端 未结 3 1525
生来不讨喜
生来不讨喜 2020-12-25 08:41

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 den

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-25 09:10

    This article on the Android Developers' site shows the range of screen resolutions for each density.

    I believe the wallpapers have to match the screen resolution and are not stretched. You can see this if, for example, you create a new emulator with a high screen density like 480x854. The default home screen background is centred, with large black bands at the top and bottom.

    The WallpaperManager API indicates that you must use a PNG- or JPEG-format image, even if you use the setResource() method — the resource must be a Bitmap and so not a nine-patch or other type of Drawable.

提交回复
热议问题