Re: [android-developers] Re: Virtual screen size

2011-01-01 Thread Dianne Hackborn
No the whole point is the launcher is the one with the virtual screen, so it
is the one that sets the values.  It is the one that says the range, it is
the one that updates the position as you scroll throw its UI.

If you don't like what it is doing, you can use a different launcher.

On Sat, Jan 1, 2011 at 4:38 AM, Pedro Duque pmdu...@gmail.com wrote:

 :(

 Is there any way to circumvent this? Meaning, to get screen info without
 relying on the launcher? The app is working flawlessly in the emulator...

 Thanks,
 PMD


 On 1 January 2011 06:35, Dianne Hackborn hack...@android.com wrote:

 It is up to the launcher to decide how much parallax scrolling to do.  The
 sizes and offsets come from whatever the last launcher app set them to be.

 On Fri, Dec 31, 2010 at 9:42 PM, Pedro Duque pmdu...@gmail.com wrote:

 Let me develop on this subject:

 I've develop a Live Wallpaper that was working perfectly in Android 2.1.
 It emulate the standard Android wallpaper by having a bitmap scrolling when
 a user changes screen.

 To achieve that effect I use the event onOffsetsChanged to detect
 screen changes when the user swipes left and right.

 I just installed Android 2.2.1 and now the values returned in 
 onOffsetsChanged
 for xPixelOffset and yPixelOffset are always 0. The value for xOffset and
 yOffset do return values from 0 to 1 but because
 WallpaperManager.getInstance(myContext).getDesiredMinimumHeight() and
 WallpaperManager.getInstance(myContext).getDesiredMinimumHeight() now
 return the screen physical size instead of the screen virtual size, I have
 now way to calculate how much that percentage represent in terms of actual
 displacement.

 I know it's possible to achieve the desired result because the packed
 wallpaper has that behaviour.

 Can somebody help? Is this a problem with Samsung Galaxy S implementation
 or is this a standard behaviour?

 Thanks,
 Pedro Duque

 On 1 January 2011 02:05, Pedro Duque pmdu...@gmail.com wrote:

 When developing a live wallpaper how can I get the virtual screen size?
 How can I know in which virtual screen the user is in?

 Thanks,
 PMD


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Virtual screen size

2010-12-31 Thread Pedro Duque
Let me develop on this subject:

I've develop a Live Wallpaper that was working perfectly in Android 2.1. It
emulate the standard Android wallpaper by having a bitmap scrolling when a
user changes screen.

To achieve that effect I use the event onOffsetsChanged to detect screen
changes when the user swipes left and right.

I just installed Android 2.2.1 and now the values returned in onOffsetsChanged
for xPixelOffset and yPixelOffset are always 0. The value for xOffset
and yOffset
do return values from 0 to 1 but because
WallpaperManager.getInstance(myContext).getDesiredMinimumHeight() and
WallpaperManager.getInstance(myContext).getDesiredMinimumHeight() now return
the screen physical size instead of the screen virtual size, I have now way
to calculate how much that percentage represent in terms of actual
displacement.

I know it's possible to achieve the desired result because the packed
wallpaper has that behaviour.

Can somebody help? Is this a problem with Samsung Galaxy S implementation or
is this a standard behaviour?

Thanks,
Pedro Duque

On 1 January 2011 02:05, Pedro Duque pmdu...@gmail.com wrote:

 When developing a live wallpaper how can I get the virtual screen size? How
 can I know in which virtual screen the user is in?

 Thanks,
 PMD


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Virtual screen size

2010-12-31 Thread TreKing
On Fri, Dec 31, 2010 at 11:42 PM, Pedro Duque pmdu...@gmail.com wrote:

 Is this a problem with Samsung Galaxy S implementation or is this a
 standard behaviour?


Did you test it on the emulator?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Virtual screen size

2010-12-31 Thread Dianne Hackborn
It is up to the launcher to decide how much parallax scrolling to do.  The
sizes and offsets come from whatever the last launcher app set them to be.

On Fri, Dec 31, 2010 at 9:42 PM, Pedro Duque pmdu...@gmail.com wrote:

 Let me develop on this subject:

 I've develop a Live Wallpaper that was working perfectly in Android 2.1. It
 emulate the standard Android wallpaper by having a bitmap scrolling when a
 user changes screen.

 To achieve that effect I use the event onOffsetsChanged to detect screen
 changes when the user swipes left and right.

 I just installed Android 2.2.1 and now the values returned in onOffsetsChanged
 for xPixelOffset and yPixelOffset are always 0. The value for xOffset and 
 yOffset
 do return values from 0 to 1 but because
 WallpaperManager.getInstance(myContext).getDesiredMinimumHeight() and
 WallpaperManager.getInstance(myContext).getDesiredMinimumHeight() now
 return the screen physical size instead of the screen virtual size, I have
 now way to calculate how much that percentage represent in terms of actual
 displacement.

 I know it's possible to achieve the desired result because the packed
 wallpaper has that behaviour.

 Can somebody help? Is this a problem with Samsung Galaxy S implementation
 or is this a standard behaviour?

 Thanks,
 Pedro Duque

 On 1 January 2011 02:05, Pedro Duque pmdu...@gmail.com wrote:

 When developing a live wallpaper how can I get the virtual screen size?
 How can I know in which virtual screen the user is in?

 Thanks,
 PMD


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en