×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jul 2012
    Posts
    25

    Issue with category bar

    javax.microedition.lcdui.Image[] unselectedIcons = { ImageHelper.playvideo, ImageHelper.photo };
    javax.microedition.lcdui.Image[] selectedIcons = { ImageHelper.playvideo, ImageHelper.photo };

    String[] cmdStrArray = {"Video","Photo"};
    CategoryBar bar = new CategoryBar(unselectedIcons,selectedIcons,cmdStrArray);
    System.out.println("CategoryBar: Icon best Height="+CategoryBar.getBestImageHeight(CategoryBar.IMAGE_TYPE_ICON)+" Width="+CategoryBar.getBestImageWidth(CategoryBar.IMAGE_TYPE_ICON));

    bar.setElementListener(this);
    bar.setVisibility(true);

    Hello All, I'm using the latest Nokia SDK2.0 and LWUIT downloaded from:

    http://www.developer.nokia.com/Develop/Java/
    http://projects.developer.nokia.com/LWUIT_for_Series_40

    With the code above, I try to create a com.nokia.mid.ui.CategoryBar for one of my forms.

    However, I face the issue where the first button on categoryBar will not respond to touch until I have selected the second button on categoryBar. Can anyone help me?

  2. #2
    Nokia Developer Expert
    Join Date
    Aug 2011
    Posts
    555

    Re: Issue with category bar

    Hi ChinLoong,

    the first button on categoryBar will not respond to touch until I have selected the second button on categoryBar
    Do you mean that you don't receive a notifyElementSelected call back, when you have tapped on the already selected CategoryBar item? This is expected behavior (even when you don't use the LWUIT for Series 40). You only receive a call back from this method with the selected index, when an unselected index gets selected. At the same time, the selected index gets the selected icon from the implementation (if you have specified any), and the previously selected item, gets the unselected icon.

  3. #3
    Registered User
    Join Date
    Jul 2012
    Posts
    25

    Re: Issue with category bar

    Quote Originally Posted by skalogir View Post
    Hi ChinLoong,



    Do you mean that you don't receive a notifyElementSelected call back, when you have tapped on the already selected CategoryBar item? This is expected behavior (even when you don't use the LWUIT for Series 40). You only receive a call back from this method with the selected index, when an unselected index gets selected. At the same time, the selected index gets the selected icon from the implementation (if you have specified any), and the previously selected item, gets the unselected icon.
    This makes sense now. Thanks!

Similar Threads

  1. game category
    By doomer999 in forum Mobile Java General
    Replies: 6
    Last Post: 2011-03-15, 21:29
  2. Doubt in add category?
    By bhakki in forum Mobile Java General
    Replies: 2
    Last Post: 2010-10-28, 07:27
  3. Category and kxml2?!
    By xmenus in forum Mobile Java General
    Replies: 2
    Last Post: 2010-07-23, 17:02

Posting Permissions

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