LWUIT: how to show menu commands with another button

In LWUIT, we can add a command button directly to the form using the addCommand function, as in this link http://lwuit.java.net/tutorial/events.html . Since I'm currently developing a Nokia Asha Full Touch Apps showing these commands, I could just click on it with the left button.

However, I created a custom title bar, so now I have a button inside the container as the title I created

The custom bar I've made

3 bars above - button with image.

Does LWUIT have something like a show menu like Android Activity.openOptionMenu ?

Best wishes

+4
source share
1 answer

Hello! (my first post on stackoverflow)

You need to use the component PopupList com.nokia.mid.ui. No problem with this with LWUIT.

Popuplist javadoc

As you can see in javadoc. This is an example:

 PopupList list1 = new PopupList(); PopupListItem item1 = new PopupListItem("Item1"); PopupListItem item2 = new PopupListItem("Item1", image1); list1.appendItem(item1); list1.appendItem(item2); list1.setVisible(true); 

The position of the menu will be useful for your purpose.

+5
source

All Articles