Skip to main content

LWUIT: tabs - how to mark the currently selected tab?

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2011-12-07

I have 4 tabs. Each tab is represented by a button. Those buttons are used to select the currently displayed tab. Each button has an icon and text.

I'd like to highlight the currently selected tab by changing background color and text label color of the corresponding button. I'd like to do it using Theme and Resource Editor.

I created theme and specified unselected, selected and pressed styles for UIID "Tab". My tabs look great in Sun WTK! Fine! But I found that on a real phone the tabs always look like unselected. I tried on Nokia 5800 XPressMusic and C7. Why the difference?

After some experiments I found out the reason - the buttons may be only in 2 states: unselected and pressed. They never be in the selected state. On the emulator when I move to a button using navi keys, it becomes selected.

So, what should I do to mark the current tab?

I use LWUIT 1.5.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-11-07