Skip to main content

screensaver / white or black screen

9 replies [Last post]
francisdb
Offline
Joined: 2006-06-16

When the screensaver kicks in (fade to black) during my lwuit application on my SE850i and I wake it up by pressing a button the screen flashes to the form but immediately after that I see a black (sometimes white) screen. Another key press brings back the form.

Is lwuit detecting its lcdui canvas is shown/hidden and doing some incorrect painting at that time? I've got no other phones right now to test on.

(This is similar to the same problem I'm having when a mmapi video player starts to play, the whole screen is overpainted in white.)

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Shai Almog

I'm not aware of any such problem in any device. I would assume that
this is caused because of suspend resume, it might be related to
something you are doing in startApp.

To check this just try testing suspend resume in the simulator (there
is a menu option in the WTK simulator window).

If this is not the case, this might be a device specific bug assuming
you want to workaround it you can override the Form.show/hideNotify
methods that should be called upon suspend/resume respectively.

Thanks,
Shai.

> When the screensaver kicks in (fade to black) during my lwuit
> application on my SE850i and I wake it up by pressing a button the
> screen flashes to the form but immediately after that I see a black
> (sometimes white) screen. Another key press brings back the form.
>
> Is lwuit detecting its lcdui canvas is shown/hidden and doing some
> incorrect painting at that time? I've got no other phones right now
> to test on.
>
> (This is similar to the same problem I'm having when a mmapi video
> player starts to play, the whole screen is overpainted in white.)
> [Message sent by forum member 'francisdb' (francisdb)]
>
> http://forums.java.net/jive/thread.jspa?messageID=283990
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

francisdb
Offline
Joined: 2006-06-16

I could not reproduce this on the lwuit demo, and it only occurs after I've been using the mmapi videoplayer. I'll have to recheck my code...
(reminder to self, think first, analyze the problem and then post the forum)

Qunhuan Mei

Hi,

A list holds items of similar type.

I was wondering if a form could accommodate more than one list. This could be useful if we want to separate a list of events of different types into different groups.

But from my experiment, this might not be directly supported since the scroll bar appears to be list specific, rather than form specific. If there are two lists on the form, then the focus will have problem to go from one list to another, since scroll is always in a loop.

Any clarification please?

Thanks,

Qunhuan

Shai Almog

Hi Qunhuan,
> A list holds items of similar type.

A list can hold items of differing types too, your renderer should be
able to handle it though.
E.g. one of our customers had a list of accounts, the last entry of
that list is really a function to add a new account. Which is a
different object type and is rendered differently by the renderer.

> I was wondering if a form could accommodate more than one list.
> This could be useful if we want to separate a list of events of
> different types into different groups.

Yes and we do it quite often.

> But from my experiment, this might not be directly supported since
> the scroll bar appears to be list specific, rather than form
> specific. If there are two lists on the form, then the focus will
> have problem to go from one list to another, since scroll is always
> in a loop.

Nope, try it. You can also press fire to exit the list focus but you
don't need to...
Try right navigation and up/down navigation between lists, works as
you would expect.

Thanks,
Shai.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

Qunhuan Mei

Hi LWUIT,

I have been testing one method from a Form:

replace (currentComponent, nextComponent, Transition)

hoping to use this method for partial page update with "transition".

Say I have a page with a label on top, a list in the middle and command bar at the bottom. With a new list component, I am supposed to be able to use this "replace" method to update the screen in an animated way while keeping the top label and bottom command bar.

But when I run the code, there is no animated "transition" happening.

Is my understanding wrong or is there a problem from the LWUIT library regarding this purpose or something else?

Also, using LWUIT, is there a way we can force a "serviceRepaint" type of action so that the graphics action can be immediately accomplished?

Thanks,

Qunhuan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

Shai Almog

Hi Qunhuan,
we used replace with slide transitions with reasonable success
although there are caveats.
Replace is generally good for cases where you want to change the
CENTER of a border layout with a component which will occupy roughly
the same space, it won't work very well if the components have
differing sizes.

Replace isn't tested much so there might be issues there although it
generally seems to work for slide, fade might work too although 3D
etc.. won't!

We don't have a serviceRepaints() method and probably will never add
such a method, its just often misused and the implementation doesn't
work well in devices. What is your use case for service repaints?
Transitions occur as fast as possible and have no delay providing
essentially the functionality of service repaints.

Thanks,
Shai.

> Hi LWUIT,
>
> I have been testing one method from a Form:
>
> replace (currentComponent, nextComponent, Transition)
>
> hoping to use this method for partial page update with
> "transition".
>
> Say I have a page with a label on top, a list in the middle and
> command bar at the bottom. With a new list component, I am supposed
> to be able to use this "replace" method to update the screen in an
> animated way while keeping the top label and bottom command bar.
>
> But when I run the code, there is no animated "transition" happening.
>
> Is my understanding wrong or is there a problem from the LWUIT
> library regarding this purpose or something else?
>
> Also, using LWUIT, is there a way we can force a "serviceRepaint"
> type of action so that the graphics action can be immediately
> accomplished?
>
> Thanks,
>
> Qunhuan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

Qunhuan Mei

Hello Shai,

Many thanks for your quick response.

"What is your use case for service repaints?

-- During my testing, I noticed the form.show() may not draw the graphics as fast as it is supposed to be (not 100% sure though).
For example, when the app starts, we expect the app to draw something simple but immediately. Say draw some text first and show the form then prepare and draw an image and show the form again, all in one sequence. It looks the first form.show() is not acting immediately. This make me think to use serviceRepaint(). Internally, is the form.show()'s result be displayed immediately?

Thanks again,

Qunhuan

-----Original Message-----
From: Shai.Almog@Sun.COM [mailto:Shai.Almog@Sun.COM]
Sent: 08 July 2008 16:09
To: users@lwuit.dev.java.net
Subject: Re: How to use Form's replace (currentComponent, nextComponent, Transition) method?

Hi Qunhuan,
we used replace with slide transitions with reasonable success
although there are caveats.
Replace is generally good for cases where you want to change the
CENTER of a border layout with a component which will occupy roughly
the same space, it won't work very well if the components have
differing sizes.

Replace isn't tested much so there might be issues there although it
generally seems to work for slide, fade might work too although 3D
etc.. won't!

We don't have a serviceRepaints() method and probably will never add
such a method, its just often misused and the implementation doesn't
work well in devices. What is your use case for service repaints?
Transitions occur as fast as possible and have no delay providing
essentially the functionality of service repaints.

Thanks,
Shai.

> Hi LWUIT,
>
> I have been testing one method from a Form:
>
> replace (currentComponent, nextComponent, Transition)
>
> hoping to use this method for partial page update with
> "transition".
>
> Say I have a page with a label on top, a list in the middle and
> command bar at the bottom. With a new list component, I am supposed
> to be able to use this "replace" method to update the screen in an
> animated way while keeping the top label and bottom command bar.
>
> But when I run the code, there is no animated "transition" happening.
>
> Is my understanding wrong or is there a problem from the LWUIT
> library regarding this purpose or something else?
>
> Also, using LWUIT, is there a way we can force a "serviceRepaint"
> type of action so that the graphics action can be immediately
> accomplished?
>
> Thanks,
>
> Qunhuan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

Shai Almog

Hi Qunhuan,
this is probably the exact case where serviceRepaints would do more
damage than good.

show() doesn't repaint anything but instead triggers a single paint,
serviceRepaints would just cause further delays in the drawing. If
you are seeing a delay in painting some of the components then I
would like to see an example since the first paint should be immediate.

Thanks,
Shai.

> Hello Shai,
>
> Many thanks for your quick response.
>
> "What is your use case for service repaints?
>
> -- During my testing, I noticed the form.show() may not draw the
> graphics as fast as it is supposed to be (not 100% sure though).
> For example, when the app starts, we expect the app to draw
> something simple but immediately. Say draw some text first and show
> the form then prepare and draw an image and show the form again,
> all in one sequence. It looks the first form.show() is not acting
> immediately. This make me think to use serviceRepaint().
> Internally, is the form.show()'s result be displayed immediately?
>
> Thanks again,
>
> Qunhuan
>
> -----Original Message-----
> From: Shai.Almog@Sun.COM [mailto:Shai.Almog@Sun.COM]
> Sent: 08 July 2008 16:09
> To: users@lwuit.dev.java.net
> Subject: Re: How to use Form's replace (currentComponent,
> nextComponent, Transition) method?
>
> Hi Qunhuan,
> we used replace with slide transitions with reasonable success
> although there are caveats.
> Replace is generally good for cases where you want to change the
> CENTER of a border layout with a component which will occupy roughly
> the same space, it won't work very well if the components have
> differing sizes.
>
> Replace isn't tested much so there might be issues there although it
> generally seems to work for slide, fade might work too although 3D
> etc.. won't!
>
> We don't have a serviceRepaints() method and probably will never add
> such a method, its just often misused and the implementation doesn't
> work well in devices. What is your use case for service repaints?
> Transitions occur as fast as possible and have no delay providing
> essentially the functionality of service repaints.
>
> Thanks,
> Shai.
>
>> Hi LWUIT,
>>
>> I have been testing one method from a Form:
>>
>> replace (currentComponent, nextComponent, Transition)
>>
>> hoping to use this method for partial page update with
>> "transition".
>>
>> Say I have a page with a label on top, a list in the middle and
>> command bar at the bottom. With a new list component, I am supposed
>> to be able to use this "replace" method to update the screen in an
>> animated way while keeping the top label and bottom command bar.
>>
>> But when I run the code, there is no animated "transition" happening.
>>
>> Is my understanding wrong or is there a problem from the LWUIT
>> library regarding this purpose or something else?
>>
>> Also, using LWUIT, is there a way we can force a "serviceRepaint"
>> type of action so that the graphics action can be immediately
>> accomplished?
>>
>> Thanks,
>>
>> Qunhuan
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
>> For additional commands, e-mail: users-help@lwuit.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

Qunhuan Mei

Ok, leave it for the moment. But if I have any concrete code case, will let you know.

Many thanks,

Qunhuan

-----Original Message-----
From: Shai.Almog@Sun.COM [mailto:Shai.Almog@Sun.COM]
Sent: 08 July 2008 17:08
To: users@lwuit.dev.java.net
Subject: Re: How to use Form's replace (currentComponent, nextComponent, Transition) method?

Hi Qunhuan,
this is probably the exact case where serviceRepaints would do more
damage than good.

show() doesn't repaint anything but instead triggers a single paint,
serviceRepaints would just cause further delays in the drawing. If
you are seeing a delay in painting some of the components then I
would like to see an example since the first paint should be immediate.

Thanks,
Shai.

> Hello Shai,
>
> Many thanks for your quick response.
>
> "What is your use case for service repaints?
>
> -- During my testing, I noticed the form.show() may not draw the
> graphics as fast as it is supposed to be (not 100% sure though).
> For example, when the app starts, we expect the app to draw
> something simple but immediately. Say draw some text first and show
> the form then prepare and draw an image and show the form again,
> all in one sequence. It looks the first form.show() is not acting
> immediately. This make me think to use serviceRepaint().
> Internally, is the form.show()'s result be displayed immediately?
>
> Thanks again,
>
> Qunhuan
>
> -----Original Message-----
> From: Shai.Almog@Sun.COM [mailto:Shai.Almog@Sun.COM]
> Sent: 08 July 2008 16:09
> To: users@lwuit.dev.java.net
> Subject: Re: How to use Form's replace (currentComponent,
> nextComponent, Transition) method?
>
> Hi Qunhuan,
> we used replace with slide transitions with reasonable success
> although there are caveats.
> Replace is generally good for cases where you want to change the
> CENTER of a border layout with a component which will occupy roughly
> the same space, it won't work very well if the components have
> differing sizes.
>
> Replace isn't tested much so there might be issues there although it
> generally seems to work for slide, fade might work too although 3D
> etc.. won't!
>
> We don't have a serviceRepaints() method and probably will never add
> such a method, its just often misused and the implementation doesn't
> work well in devices. What is your use case for service repaints?
> Transitions occur as fast as possible and have no delay providing
> essentially the functionality of service repaints.
>
> Thanks,
> Shai.
>
>> Hi LWUIT,
>>
>> I have been testing one method from a Form:
>>
>> replace (currentComponent, nextComponent, Transition)
>>
>> hoping to use this method for partial page update with
>> "transition".
>>
>> Say I have a page with a label on top, a list in the middle and
>> command bar at the bottom. With a new list component, I am supposed
>> to be able to use this "replace" method to update the screen in an
>> animated way while keeping the top label and bottom command bar.
>>
>> But when I run the code, there is no animated "transition" happening.
>>
>> Is my understanding wrong or is there a problem from the LWUIT
>> library regarding this purpose or something else?
>>
>> Also, using LWUIT, is there a way we can force a "serviceRepaint"
>> type of action so that the graphics action can be immediately
>> accomplished?
>>
>> Thanks,
>>
>> Qunhuan
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
>> For additional commands, e-mail: users-help@lwuit.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net