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

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

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -