I have a list of array items, And what i need is while clicking a specific key i want to show a popup listing the array items.
public boolean onKeyUp(int keyCode, KeyEvent event)
{
switch(keyCode) {
case KeyEvent.KEYCODE_MENU:
keymenu();
return true;
}
return false;
}
private void keymenu()
{
PopupMenu menu = new PopupMenu(this, myvid);
menu.getMenu().add("titleRes");
menu.getMenu().add("titleRes1");
menu.getMenu().add("titleRes2");
menu.getMenu().add("titleRes3");
menu.show();
}
I tried this and the pop is not showing while clicking the menu button.