×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Oct 2011
    Posts
    29

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

    Hi,

    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?

  2. #2
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    1,595

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

    Hello azakharo,

    Regarding your question on the different outcome, the reason could be due to the different support for LWUIT on the Sun WTK and on a real device.

    Out of curiosity, can you possibly use the pressed state for the purpose (i.e. instead of the 'selected' state)?

    Regards,
    r2j7
    [URL="http://library.forum.nokia.com/java"][B] >>> Java Developer's Library <<<[/B][/URL]
    [URL="https://www.developer.nokia.com/Resources/Support/Technical_support.xhtml"] [B]>>> Technical Support for Java ME development <<<[/B][/URL]
    [URL="https://publish.ovi.com/info/"][B]>>> Nokia Publish: reach millions of Nokia users worldwide through Nokia Store <<<[/B][/URL]

  3. #3
    Registered User
    Join Date
    Oct 2011
    Posts
    29

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

    I know the reason of the difference (WTK vs real phone) - Nokia 5800 and C7 mobiles are touch mobiles, Sun WTK emulator having non touch mobiles. So Selected and Unselected style working fine on these Emulators.

    Now about the pressed state...
    The button of the selected tab is not in the pressed state. All buttons normally are in the unselected state. They are in the pressed state only during the short period when pressed.

  4. #4
    Registered User
    Join Date
    Oct 2011
    Posts
    29

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

    I have answered my own question.
    See
    http://stackoverflow.com/questions/8...y-selected-tab

Similar Threads

  1. Replies: 1
    Last Post: 2009-07-04, 14:22
  2. Replies: 2
    Last Post: 2008-11-10, 11:11
  3. Navigation Tabs (or Tabs Pane) in J2ME/Series 60
    By shadisky in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2005-05-05, 19:48
  4. Navigation Tabs (or Tabs Pane) in J2ME/Series 60
    By shadisky in forum Mobile Java General
    Replies: 0
    Last Post: 2005-05-05, 19:43
  5. How to show tabs on selected views
    By qianghstc in forum Symbian User Interface
    Replies: 1
    Last Post: 2004-07-16, 05:04

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×