I am writing an app that allows a user to set the phone's wallpaper from a list of pictures. By default it scrolls across the multiple home screens. I want the wallpaper on the home screen to be a static non-scrolling image.
What can I do programmatically to achieve this? Is this even possible?
I am using wallpaperManager.setResource(...);
to set the wallpaper.
I've also tried wallpaperManager.setWallpaperOffsetSteps(0,0);
but that did not solve my problem.
Normally ImageWallpaper's size is set double wider than display's width so when you scroll home left or right, ImageWallpaper handles offsetchange events.
I've not tried this, but it may work i think. You may try this: [suggestDesiredDimensions]: http://developer.android.com/reference/android/app/WallpaperManager.html#suggestDesiredDimensions(int, int)
Set dimensions same as your workspace's width.
This is controlled by the Launcher application. If you want a non-scrolling wallpaper, install a Launcher app that doesn't scroll the wallpaper :)
I'v fulfilled this feature by:
If you want to put some effort into a solution, you could create a live wallpaper which displays a static, user-selectable image. Then your wallpaper could override the offset changes if that's what is desired. That's a lot of work, though, to stop the scrolling effect.
Alternatively, you could crop the image to the screen's size before setting it to wallpaper. That would stop the scrolling, but would break screen orientation changes.