It turns out that cropping is just a feature. User can change the
bounding rectangle to what ever size that want. Sorry, It was not
intuitive for me. Ouch!
So, the only issue is the implementation of setWallpaperDimension()
API. Any comment on that?

On Tue, Dec 29, 2009 at 2:20 PM, muni anda <[email protected]> wrote:
> Hi,
>
> I have a development platform with a 800x480 landscape panel. For the
> wallpaper, launcher (using eclair) is setting the wallpaper dimensions
> to 960x800 instead of 1600x480.
>
> Following code is the suspect (from
> http://android.git.kernel.org/?p=platform/packages/apps/Launcher.git;a=blob;f=src/com/android/launcher/Launcher.java;hb=HEAD)
>
> private void setWallpaperDimension() {
>  WallpaperManager wpm = (WallpaperManager)getSystemService(WALLPAPER_SERVICE);
>
>  Display display = getWindowManager().getDefaultDisplay();
>  boolean isPortrait = display.getWidth() < display.getHeight();
>  final int width = isPortrait ? display.getWidth() : display.getHeight();
>  final int height = isPortrait ? display.getHeight() : display.getWidth();
>  wpm.suggestDesiredDimensions(width * WALLPAPER_SCREENS_SPAN, height);
> }
>
> Should the fix be to change the above code to get the
> portrait/landscape information from android:screenOrientation?
>
> Even after I fixed above, when I attempt to change the wallpaper with
> the bitmap of 1600x480  com.android.camera.cropImage is launched and
> the resulting wallpaper is the cropped and zoomed version of my
> original bitmap. Cropping/Zooming seems to kick-in no matter what the
> dimensions of my bitmap is. I was wondering under what conditions the
> cropping will kicks-in.
>
> I am tyring to understand the logic here by digging through the code.
> But, if someone can provide a quick answer or pointer to look for that
> would be great.
>
> Thanks
> -Muni
>

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to