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

Reply With Quote

