Hi jmpessoa,
sorry to pest, having another trouble, this time with jMenu.
Want to achieve following behavior:
1. there appears a menu (at the bottom of the phone display) when user presses the device menu button.
2. from this menu when user clicks on the item directly a custom dialog appears (jCustomDialog).
Now I have (basically a copy paste from jMenu demo):
procedure TAndroidModule1.AndroidModule1CreateOptionMenu(Sender: TObject;
jObjMenu: jObject);
var
I: Integer;
SubMenu: jObject;
begin
for I := 0 to MainMenu.Options.Count - 1 do
begin
SubMenu := MainMenu.AddSubMenu(jObjMenu, MainMenu.Options[I], MainMenu.IconIdentifiers[I]);
MainMenu.AddItem(SubMenu, I + 1, MainMenu.Options[I], mitDefault);
end;
end;
procedure TAndroidModule1.AndroidModule1ClickOptionMenuItem(Sender: TObject;
jObjMenuItem: jObject; itemID: integer; itemCaption: string; checked: boolean
);
begin
case itemID of
1:
begin
EDDlg.Text := FIP;
Dlg.Show('Select IP address:');
end;
2:
begin
EDDlg.Text := FPort;
Dlg.Show('Select UPD port:');
end;
end;
end;
// Dlg: jCustomDialog; EDDlg: jEditText;
But this produces intermediate 'submenu' in the middle of the phone display and I must click the item there once again.
Is there a way how to remove this intermediate 'submenu'?
Thank you