<http://stackoverflow.com/questions/12373790/setting-the-dimensions-of-a-bitmap-for-a-live-wallpaper#> I'm creating a live wallpaper and I'm kinda confused about how I should set the dimensions of the bitmap. Consider that my wallpaper sets a background, I want that to behave as a regular wallpaper with parallax scrolling. So I set the width and height of the bitmap as what I get from getDesiredMinimumWidth() and getDesiredMinimumHeight() and I have the same dimensions in both portrait and landscape modes and then just center the image.
But then sometimes getDesiredMinimumWidth() and getDesiredMinimumHeight()return -1. The documentation says that in such a situation I should use the display's width. I could do that but I won't have scrolling then. To fix that, I could just double the bitmap's width but then in portrait & landscape modes I would get different dimensions. Is what I'm doing the correct approach or should I be doing it differently? How do you guys do it? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

