So I want to, some times menu showable sometimes it not show.
B4X:
dim shw_menu as boolean
shw_menu=true ' or false
if shw_memu then
'... menu can show (disable=true)
' ????code ...(you said to me)
else
' --- menu con not show (disable=false)
' ????code ...(you said to me)
end if
You need to use an Actionbar where you can place your own menu.
Look out for libraries which can add/change/disable/remove menuitems
For ex MSMaterialDrawer
Sub Activity_KeyPress (KeyCode As Int) As Boolean
If KeyCode = KeyCodes.KEYCODE_MENU Then
if shw_memu then
Return False
else
Return True
end if
Else
Return false
End If
End Sub
Sub Activity_KeyPress (KeyCode As Int) As Boolean
If KeyCode = KeyCodes.KEYCODE_MENU Then
if shw_memu then
Return False
else
Return True
end if
Else
Return false
End If
End Sub
You need to use an Actionbar where you can place your own menu.
Look out for libraries which can add/change/disable/remove menuitems
For ex MSMaterialDrawer