How to handle events for options menu in Python (Android)? -
How to handle events for options menu in Python (Android)? -
i'm getting started in python development android. have created simple options menu , want function called when menu item selected.
import android droid = android.android() droid.addoptionsmenuitem("show list","showlist","showlist","ic_media_record") droid.addoptionsmenuitem("exit","exit","exit","ic_media_stop") def showlist(): print("show list event handler") while true: response=droid.eventwait().result if response["name"]=="showlist": showlist if response["name"]=="exit": exit
menu visible funtion not called. easiest , standard method handle events?
android python
Comments
Post a Comment