I am working on BB OS v5.0, 8520. I have managed to get the list to appear on the screen. I am using a String Array and adding it into a Vector. Now I want to find out onclick, which is the item that is clicked and accordingly perform some operation. for the time being lets just say i want to throw an alert. any help..
Share
In your
ListFieldyou should overridenavigationClick(int status, int time). Then inside of thenavigationClick()get the selected item index viaListField.getSelectedIndex()and do what ever you need with it.Note, you don’t need to override
touchEvent(TouchEvent message), becausenavigationClick()is called by BB framework regardless of whether the click event is originated by a touch-screen event or a trackball(pad) event. So the code will work for any screen type.