I have a LWUIT J2ME app with a List. I would like for the background of a cell to change when it is clicked.
The first thing I had to do was set the background transparency and color of the whole list when it is selected. Otherwise, the background of the form behind it shows through when the list is clicked. I did that with this code:
catList.getSelectedStyle().setBgTransparency(255);
catList.getSelectedStyle().setBgColor(0x23222a);
This seems to work fine. When clicked, the list bg remains the same color.
Now I want the background of the clicked cell to change color when it is pressed. I tried this (cellCon is a Container):
cellCon.getPressedStyle().setBgTransparency(255);
cellCon.getPressedStyle().setBgColor(0xFFFFFF);
cellCon.getSelectedStyle().setBgTransparency(255);
cellCon.getSelectedStyle().setBgColor(0xFFFFFF);
But it has no effect. How can I get the effect that I want?
Thanks!