Hi,
How do we create bottom menu options and their events for android apps?
10 Answers
No, not the top ones..They are same as a tab menu, I need a Menu bar at the bottom.
The menu which appears if you press the menu button on any android device.
What properties to the Menu Items have?
And can we add icons to android menu items?
Thanks!
If you mean the tabbedmenu buttons; android has them on top of the window. If you create a new Ti project, there are automaticly 2 buttons created.
Don Thorp mentioned previously that the Android menu is temporarily disabled. It was not compatible with the move to 1.0.0.
They will be getting it fixed I'm sure :)
Edit (Don Thorp): Removed e on Thorp ;)
Menu should work in most cases now. I have Ticket 667 to document the API. You can put a watch on that item and you'll see when it's done.
You can see how I used it in the mapview.js example.
bottom line: Does the menu work in android? If not when will it be fixed?? Thx.
Ok. Got the Menu to work on Android using the MapView example. My application uses a TabGroup and this seems to be a incompatible with the menu. I comment out the TabGroup.open method and the menu works. Uncomment and it does not. Pressing the button and nothing happens and no messages from adb logcat. HELP!!!! Thanks.
Conrad
What properties to the Menu Items have?
And can we add icons to android menu items?
Thanks!
What properties to the Menu Items have?
And can we add icons to android menu items?
Thanks!
Hi, This works for me (at least partially)
// // Option Menu // menu = Titanium.UI.Android.OptionMenu.createMenu(); var removeAll = null; removeAll = Titanium.UI.Android.OptionMenu.createMenuItem({title:'Remove All'}); removeAll.addEventListener('click', function() { // your code here ............. }); var tb1 = null; tb1 = Titanium.UI.Android.OptionMenu.createMenuItem({title : 'Toolbar 1'}); tb1.addEventListener('click', function() { // your code for Toolb1 click here }); var tb2 = null; tb2 = Titanium.UI.Android.OptionMenu.createMenuItem({title : 'Toolbar 2'}); tb2.addEventListener('click', function() { // your code for toolbar 2 goes here }); // button 3 var tb3 = null; tb3 = Titanium.UI.Android.OptionMenu.createMenuItem({title : 'Toolbar 3'}); tb3.addEventListener('click',function() { // your code for toolbar 3 click goes here }); menu.add(tb1); menu.add(tb2); menu.add(tb3); menu.add(removeAll); Titanium.UI.Android.OptionMenu.setMenu(menu);In android 1.6 emulator or phone, the option menu is not displayed every time using this code. In 1 out of 4-5 program starts the option menu is not there ....
Any ideas welcome.
Your Answer
Think you can help? Login to answer this question!