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

Popular posts from this blog

php - How to pass multiple values from url -

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

database - php search bar when I press submit with nothing in the search bar it shows all the data -