List item style not rendered

45 views
Skip to first unread message

Ivan

unread,
May 2, 2021, 10:27:33 AM5/2/21
to CodenameOne Discussions
Hi guys,
I'm usig com.codename1.ui.List with items of type Multibutton and in renderer I'm setting color of "Line1".text  based on data.
When list is shown my style is not applied. I have to scroll the list the style to appear.
I tried to revalidate/repaint in various places and the workaround: set selected to index 0 and scrollToSelected but this is ignored until I change index beyond current screen and it really scrolls (which is not acceptable)
How to force the list to revalidate/repaint my styles?

Tested in simulator.

Thanks

Ivan

Shai Almog

unread,
May 2, 2021, 9:54:41 PM5/2/21
to CodenameOne Discussions
Hi,
when the list doesn't have focus no selection is rendered by default.
I think invoking setIgnoreFocusComponentWhenUnfocused(false) would disable that behavior.
Reply all
Reply to author
Forward
0 new messages