Sunday, December 6, 2009

[android-developers] Re: How to turn of screen clearing between Activities

Your comments pushed me in the right direction.
The problem was that i am generating the background asynchronous
based on the display size.
The screen turned black for one frame until the background image was
generated.
Now that changed that to synchronous behaviour it doesn't turn black
anymore.

Thanks
Michael

On Dec 6, 7:33 am, Dianne Hackborn <hack...@android.com> wrote:
> There is not generally such a thing, as can be seen by how most activities
> in the standard platform don't do this (for example navigating all through
> ApiDemos).
>
> There are a couple ways flicker can happen if you aren't careful: for
> example when using a SurfaceView if the surface is just filled with black
> when initializing (unfortunately it can be hard to avoid this in many
> cases), doing async loading for data so for ex you haven't filled in a list
> by the time the window is displayed, or causing a screen orientation change
> when switching activities where there are still some places where the system
> doesn't keep the screen frozen long enough.
>
> The general way this works is that the system waits until all created
> windows in the next activity have drawn their first frame before switching
> away from the previous one and showing the next one.  So as long as you are
> careful that your first draw is done appropriately, things should be fine.
>
> You will need to give more details about exactly what situation you are
> seeing to get more help.
>
> On Sat, Dec 5, 2009 at 6:25 PM, Michael Bollmann <
>
> michael.bollm...@googlemail.com> wrote:
> > How can i avoid that the whole screen is filled with black between two
> > Activities that look almost the same?
> > Its an unnecessarily annoying flicker if both Activities got exactly
> > the same background image.
>
> > --
> > 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+unsubscribe@googlegroups.com<android-developers%2Bunsubscribe@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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate