Does the "Option Menu" button work in Android environment?

The place to discuss anything and everything about running your LiveCode on Android

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

Post Reply
DR White
Posts: 421
Joined: Fri Aug 23, 2013 12:29 pm
Location: Virginia, USA

Does the "Option Menu" button work in Android environment?

Post by DR White » Sat Oct 22, 2016 2:28 pm

I am using LC 8.1.1.

When I try a Option Menu button in android, it does nothing.
Has anybody else had success in this area?

Thanks,

David

Klaus
Posts: 10386
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Does the "Option Menu" button work in Android environmen

Post by Klaus » Sat Oct 22, 2016 3:00 pm

I moved this thread to the ANDROID forum, since it is not really DATABASE related! 8)

DR White
Posts: 421
Joined: Fri Aug 23, 2013 12:29 pm
Location: Virginia, USA

Re: Does the "Option Menu" button work in Android environmen

Post by DR White » Sat Oct 22, 2016 3:08 pm

Klaus,

Maybe you should move this over to "Android Development" since it has been posted for several days and there has been no response (all though all beginners should be aware of this, before they get deep into an iPad development app):

"How do I make my app fill iPad 12.9 Retina display?"

Thanks,

David

Klaus
Posts: 10386
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Does the "Option Menu" button work in Android environmen

Post by Klaus » Sat Oct 22, 2016 3:39 pm

Hi David,
DR White wrote:Maybe you should move this over to "Android Development"...
I already did, as you might have noticed (or not)! :D


Best

Klaus

DR White
Posts: 421
Joined: Fri Aug 23, 2013 12:29 pm
Location: Virginia, USA

Re: Does the "Option Menu" button work in Android environmen

Post by DR White » Sat Oct 22, 2016 3:48 pm

Klaus,

I was referring to my other post on "How do I make my app fill iPad 12.9 Retina display?", maybe it should go to the IOS Development.

Thanks,

David

Klaus
Posts: 10386
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Does the "Option Menu" button work in Android environmen

Post by Klaus » Sat Oct 22, 2016 5:01 pm

Ah, OK, I see, will do so!

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4661
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Does the "Option Menu" button work in Android environmen

Post by jacque » Sat Oct 22, 2016 5:24 pm

DR White wrote:When I try a Option Menu button in android, it does nothing.
No menu buttons work on mobile. Instead use the mobilePick command to show the OS native picker.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

DR White
Posts: 421
Joined: Fri Aug 23, 2013 12:29 pm
Location: Virginia, USA

Re: Does the "Option Menu" button work in Android environmen

Post by DR White » Sat Oct 22, 2016 5:38 pm

Jacque,

Thats good to know.

I have no experience using an Android mobile piker (the one I used for IOS, does not work in Android). I have checked the dictionary and the link for "Mobile Task" and I cannot find any examples or "How to" for an Android mobile picker. Could you point me in the right direction for such reference material?

Thanks,

David

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4661
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Does the "Option Menu" button work in Android environmen

Post by jacque » Sat Oct 22, 2016 6:21 pm

It should be in the dictionary, look up "mobilePick". You pass it some parameters and it creates a native picker on both iOS or Android.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

DR White
Posts: 421
Joined: Fri Aug 23, 2013 12:29 pm
Location: Virginia, USA

Re: Does the "Option Menu" button work in Android environmen

Post by DR White » Sat Oct 22, 2016 7:10 pm

In the dictionary example below:

on mouseUp
put the weekdayNames into tDays
put lineoffset("Tuesday", tDays) into tInitialIndex
mobilePick tDays, tInitialIndex
end mouseUp

Where and how do I get the day of the week that was selected by the mobilePicker?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4661
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Does the "Option Menu" button work in Android environmen

Post by jacque » Sat Oct 22, 2016 8:11 pm

The weekdaynames is a built-in function, also in the dictionary. You would replace that with your own list that you want to display.

Edit: I misunderstood your question. The value is returned in "the result" as an integer representing the line number of the chosen item. If nothing is selected, zero is returned. So:

Code: Select all

put the weekdayNames into tDays
put lineoffset("Tuesday", tDays) into tInitialIndex
mobilePick tDays, tInitialIndex
put the result into tLineNum
Then you can use line tLineNum of the original list to get the text of the choice. If zero comes back, the user canceled. On iOS there are other options, but the above is common to both iOS and Android.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

DR White
Posts: 421
Joined: Fri Aug 23, 2013 12:29 pm
Location: Virginia, USA

Re: Does the "Option Menu" button work in Android environmen

Post by DR White » Sat Oct 22, 2016 8:43 pm

Jacque,

Yes, that works great.
Sorry of being so slow.
I should have thought of that.

Thanks,

David

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4661
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Does the "Option Menu" button work in Android environmen

Post by jacque » Sat Oct 22, 2016 8:53 pm

We're all slow when we haven't done something before. You're not so special. :)
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Android Deployment”