Android Question App crash pressing the menu button

Alberto Michelis

Well-Known Member
Licensed User
Hi,
Im testing with 4.4.2
My app uses the PopupMenu of the StdActionBarHelper Library
I dont have any AddmenuItem in any module
A user install my app in android 2.2,it works ok but when he accidentally pressed the menu button ( from the device) suddenly appears:
popup > press here
and then the app crashed.
Any Idea of how to deal with it?
Thanks
 

Alberto Michelis

Well-Known Member
Licensed User
I didnt think it was important because there are no

B4X:
'Activity_create....
 Activity.AddMenuItem3("Popup", "Menu", LoadBitmap(File.DirAssets, "ic_menurayitas.png"), True)
 Activity.AddMenuItem3("Ayuda", "mnuAyuda", LoadBitmap(File.DirAssets, "ic_help_circle.png"), True)


Sub Menu_Click
   Log("Show popup")

   'add the dummy view to the activity
   dummy.Initialize("")
   Activity.AddView(dummy, 80%x, 0, 1dip, 1dip)
   dummy.Color = Colors.Transparent

   'Create and show popup menu
   Dim pop As PopupMenu
   pop.Initialize("ABPop", dummy)
   
   pop.AddMenuItem(0, "Agregar Especie " , GetDrawable("ic_mas_especie"))
   pop.AddMenuItem(1, "Agregar Efectivo ", GetDrawable("ic_mas_pesos"))
   pop.AddMenuItem(2, "Grafico por Especie ", GetDrawable("ic_chart_pie"))
   pop.AddMenuItem(3, "Grafico por Panel ", GetDrawable("ic_chart_arc"))
   pop.Show
   
End Sub
 
Top