Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 20
Registered: ‎10-29-2009
My Device: Not Specified

UI design; ListField and EyelidField

So the functionality I want to develop is something like the text message interface. An eyelidfield at the bottom, always viewable and a list of all, in my case, files. When you select a certain list item you have some available buttons in the eyelidfield that allow you to perform certain actions on this item. For example view the file, delete etc.

The problem that I am facing at the moment is that the eyelidfield will always appear at the bottom of the listfield, so if the list is greater than the screen height you have to scroll to reach the actions. Also, I am not sure how to store the selected item when navigationclick occurs and then have to use fieldchange for each button, as when the button is clicked the focus is taken from the selected item and I receive a null item.

The following is a some what slimed down version of what I am using:



private void createUI(){
		mapView = new ButtonField("View", Field.FIELD_HCENTER);
		VerticalFieldManager vfm = new VerticalFieldManager(VERTICAL_SCROLL | VERTICAL_SCROLLBAR);
		EyelidFieldManager efm = new EyelidFieldManager();
		hfm = new HorizontalFieldManager(Field.USE_ALL_WIDTH);
		list = new ObjectListField();
		String[] loadedTours = Controller.getController().getLoadedToursList();

	public void fieldChanged(Field field, int context) {
		if(field == back){
		}else if(field == mapView){
BrowserSession visit = Browser.getDefaultSession();
			visit.displayPage(TOURSURL + Tokeniser.buildSuitableURLString(mapName));
	protected boolean navigationClick(int status, int time){
		int i = list.getSelectedIndex();
		mapName = (String) list.get(list, i);
		return true;



mapName - the selected list item (global)


I want to be able to access that value still when a button is clicked.


Any help is appreciated



Posts: 17,024
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: UI design; ListField and EyelidField

i would suggest to work either with a popupscreen or a context menu.


implementing your idea would be possible, but a bit inconvinient i think. you could store the clicked element and move the focus to the buttons. place the buttons in the status area (setStatus in MainScreen) to keep it simple.

do whatever you want to, move the focus back to the listfield, select the correct item again and undisplay the buttons.

feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Posts: 20
Registered: ‎10-29-2009
My Device: Not Specified

Re: UI design; ListField and EyelidField

So there is no simple way of implementing similar functionality to the sms interface?



I have put the UI dev on the back burner for the moment, so when I come back to it I will update on how I approach achieving this. If I can.