×

Discussion Board

Results 1 to 2 of 2

Hybrid View

  1. #1
    Registered User
    Join Date
    Feb 2013
    Posts
    5

    Implicit list click

    Code:
     Image images[];        
                                
              // Create array of corresponding string objects                                                
              String options[] ;          
    
              Vector v = new Vector();
              WebService.getTop20(v, 1);
              
              images = new Image[v.size()];
              options = new String[v.size()];
              int i = 0;
              while(i < v.size())
              {
            	  Song fo = (Song)v.elementAt(i);
            	  options[i] = fo.getSongName();
            	  images[i] =  Image.createImage(fo.albumCover, 0, fo.albumCover.length);
            	  i++;
              }
            		 
              
              // Create list using arrays, add commands, listen for events
              List lsDocument = new List("Top 20:", 
                                     List.IMPLICIT, options, images);
              lsDocument.addCommand(option2s);
              lsDocument.addCommand(exitCommand);
              lsDocument.setCommandListener(this);
              Display.getDisplay(this).setCurrent(lsDocument);

    from webservice, i get and present both songname and the albumcover in a list.
    I want to know, how can i detect the click of a row item...and what item i did it?
    whether from the command options or detect if i click on the row

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2003
    Posts
    4,105

    Re: Implicit list click

    List.IMPLICIT plus Command.ITEM are somewhat broken in Series 40. You are able to fetch List.SELECT_COMMAND if you have s single (default) Command.ITEM for each item. But if you think about several Command.ITEMs, that does not work anymore. I redesigned my user interface as described here …

Similar Threads

  1. How to add an icon in (implicit) list in J2me using Netbeans???
    By Rahul More in forum Mobile Java Tools & SDKs
    Replies: 11
    Last Post: 2012-12-21, 09:51
  2. Replies: 2
    Last Post: 2011-05-06, 14:43
  3. Implicit List and Tickers
    By am11 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 8
    Last Post: 2010-01-24, 13:12
  4. problem with list.IMPLICIT
    By rathikathangaraj in forum Mobile Java General
    Replies: 2
    Last Post: 2005-06-23, 07:23
  5. Implicit List problem in series 60 emulator
    By jean_mountford in forum Mobile Java General
    Replies: 0
    Last Post: 2002-07-05, 19:10

Posting Permissions

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