Skip to content

Instantly share code, notes, and snippets.

@AppWerft
Created April 18, 2019 18:50
Show Gist options
  • Save AppWerft/d15295b858f5a05b3179af259154da3e to your computer and use it in GitHub Desktop.
Save AppWerft/d15295b858f5a05b3179af259154da3e to your computer and use it in GitHub Desktop.
/* this module will called from _e.source on open event */
module.exports = function(_openevent) {
console.log("_openevent");
if (!_openevent.source)
return;
var activity = _openevent.source.getActivity();
if (activity) {
console.log("_openevent activity");
activity.onCreateOptionsMenu = function(_menu) {
console.log("_openevent onCreateOptionsMenu");
const menuItem = _menu.menu.add({
title : 'Audio',
icon : Ti.App.Android.R.drawable.ic_action_audio,
showAsAction : Ti.Android.SHOW_AS_ACTION_IF_ROOM,
});
menuItem && menuItem.addEventListener("click", function(_e) {
require('ui/common/audioselector.widget')();
});
};
activity.invalidateOptionsMenu();
}
// require('vendor/versionsreminder')();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment