Screen flashes when I select answer from combobox box

27 views
Skip to first unread message

Gareth Murfin

unread,
Jul 2, 2018, 12:19:34 AM7/2/18
to CodenameOne Discussions
on android when selecting a combobox answer the whole screen briefly flashes. Not noticed it before, what could be wrong? it looks like if I keep my finger pressed the items go transparent, then after a short delay the screen flashes and one is selected.

Dave Dyer

unread,
Jul 2, 2018, 1:55:47 PM7/2/18
to CodenameOne Discussions
There's an underlying flaw in the drawing code, for off-screen bitmaps, which is apparently not easy to fix.
I avoid the problem by double buffering the entire screen, and aging the buffers approximately 80 milliseconds
before allowing them to be displayed.     My problem is not applicable if you always draw directly on the
real screen.

Shai Almog

unread,
Jul 3, 2018, 12:29:57 AM7/3/18
to CodenameOne Discussions
Dave none of the native widgets use that approach. He's using a widget.

I  think it's due to the fade animation on the combo box popup but I haven't used that in ages as combo boxes aren't a good option see: https://www.codenameone.com/blog/tip-dont-use-combobox.html

Gareth Murfin

unread,
Jul 19, 2018, 8:08:01 AM7/19/18
to CodenameOne Discussions
how do i turn off the fade shai ? I will stop using comboboxes after this app but client is keen on them.

Gareth Murfin

unread,
Jul 19, 2018, 9:02:06 AM7/19/18
to CodenameOne Discussions
Actually it was my uuids. One problem I am still having is that when i tap the combobox and then select an item from the list, while my finger is pressed the list just up and to the left a little bit, i cannot work out which uuid to adjust there to stop this happening. Absolutely hate comboboxes now lol.

Ive tried messing with all the uuids (below) but its so time consuming and you end up breakign working things... id love a mode that constantly draws the uuid in tiny text on everything that comes up, and shows u state like selected etc, that would solve all of this, i wonder if I can make a layer over the top of my app purely for debugging and do this ?

*  <li>{@code ComboBoxItem}</li>
 *  <li>{@code ComboBoxFocus}</li>
 *  <li>{@code PopupContentPane}</li>
 *  <li>{@code PopupItem}</li>
 *  <li>{@code PopupFocus}</li>

Gareth Murfin

unread,
Jul 19, 2018, 9:02:45 AM7/19/18
to CodenameOne Discussions
Sorry typo i meant "while my finger is pressed the list jumps up and to the left "

Shai Almog

unread,
Jul 20, 2018, 12:42:14 AM7/20/18
to CodenameOne Discussions
Also try ComboBoxList.
Make sure you adjust padding/margin explicitly to be identical in both selected/unselected states.

Gareth Murfin

unread,
Aug 1, 2018, 8:05:06 PM8/1/18
to CodenameOne Discussions
you know how you dont recommend comboxboxes be in use? what is it that would replace them? theyre kind of essential.

Shai Almog

unread,
Aug 2, 2018, 1:43:48 AM8/2/18
to CodenameOne Discussions
TL;DR: picker.

Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages