Avoid a wallpaper to stretch across 5 screens

nithinreddy picture nithinreddy · Jul 27, 2011 · Viewed 71.3k times · Source

I've been facing a problem. How do I set a wallpaper in Android, without stretching it across 5 home screens. To be clear, I have a resource images with resolution 320x480px and when I set it as wallpaper in Android, it gets stretched across 5 screens, but I want it to show up only in 1 screen (or the same image in all screens), got it?

I'm not interested in using a livewallpaper.

Answer

Josh picture Josh · Aug 5, 2011

Only way to have an app do that is using a live wallpaper.

There are two types of wallpaper, static and live. The scrolling of a static background is controlled by the launcher app. This is why LauncherPro and ADW can control the scrolling. When the user chooses a live wallpaper, the launcher simply displays whatever the LWP wants to render, so the LWP controls the scrolling, if any. This is how MultiPicture LWP solves the problem.

So your only options are to implement a custom launcher (which I doubt you want to do for such minor functionality) or implement a live wallpaper.

And BTW, setWallpaperOffsetSteps is an internal method called by the launcher on a live wallpaper, so the LWP knows where it's supposed to be drawing. You can't call it directly, but you can listen to onOffsetsChanged within your LWP to facilitate your own scrolling implementation.