Wallpaper offset for API level 3?
Asked Answered
O

1

7

I've all but finished my little wallpaper app. The only thing now is that I can't find any method for offset on API level 3. No matter what size image I use, it is not centered in my test phone. It looks great on the emulator, but what to do about people with older phones like the backflip? Does anyone know of any fix for this?

Octagon answered 21/1, 2011 at 20:7 Comment(3)
I'm confused by your question. Are you writing a live wallpaper app? If so, live wallpapers weren't available in API level 3. Are you writing an app that sets a static image as the current wallpaper? If so why would you need the offset?Homegrown
Obviously setting an "image" to wallpaper here, hence the use of the word "Image". and why i need an offset r something is because as i stated, the image is not quite centered on the screen. at least not on my test phone. it works fine on the emulator. developer.android.com shows i could set it specifically on api levels 5 and up, but i don't see any such documentation for level 3Octagon
Could you show the code where you set the wallpaper? I've never had any issue with the wallpaper not being set correctly by just using the setWallpaper method in the context with a Bitmap-object.Crossindex
R
0

you're not really clear about what you want, but to offset the image, you could make a new Canvas, and draw the Bitmap onto it, at the location you want.

Resplendence answered 22/3, 2012 at 15:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.