Autocomplete TextField - repaint issue
I'm using an autocomplete TextField, as detailed by the example in the LWUITblog (http://lwuit.blogspot.com/2008/06/lightweight-text-input-in-lwuit.html).
It's almost working, but in some conditions I am having repaint issues, and wondered if any of you LWUIT gurus had any insights?
I have made a simple AVI using CamStudio to demonstrate the issue:
http://stashbox.org/837750/LWUITautoCompleteProblem.avi (only 300K, not too huge)
I have made a very simple self-contained midlet that reproduces the problem. Pretty printed source code is here:
Description of problem:
It's a form containing a ComboBox, a label, and then an autocomplete text field.
To see the problem:
1) scroll down to the autocomplete textfield (2nd field down)
2) hit the emulator's '5' key to enter the J character
3) scroll right down to the bottom of the list that has appeared below the textfield
4) scroll right back up to the autocomplete textfield
5) press the emulator's '2' key (corresponds to letter 'a')
At this point the painting goes a little wrong: the textfield doesn't show "Ja", but still just "J". Also, the list below the textfield is mispainted - there are two items visible numbered "1.".
I have some inkling of what is wrong: it's something to do with the scrollbar for the list below the textfield disappearing, but the layout not recalculating properly (hence maybe the clip rect for redrawing being in the wrong place?) However, I'm still not sure how to fix this problem.
Btw, if I don't have a combo box above the autocomplete textfield, the problem goes away. But it would be very useful for my form to have that combobox too.