Page 1 of 1

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

Posted: Sat Oct 22, 2016 2:28 pm
by DR White
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

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

Posted: Sat Oct 22, 2016 3:00 pm
by Klaus
I moved this thread to the ANDROID forum, since it is not really DATABASE related! 8)

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

Posted: Sat Oct 22, 2016 3:08 pm
by DR White
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

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

Posted: Sat Oct 22, 2016 3:39 pm
by Klaus
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

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

Posted: Sat Oct 22, 2016 3:48 pm
by DR White
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

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

Posted: Sat Oct 22, 2016 5:01 pm
by Klaus
Ah, OK, I see, will do so!

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

Posted: Sat Oct 22, 2016 5:24 pm
by jacque
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.

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

Posted: Sat Oct 22, 2016 5:38 pm
by DR White
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

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

Posted: Sat Oct 22, 2016 6:21 pm
by jacque
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.

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

Posted: Sat Oct 22, 2016 7:10 pm
by DR White
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?

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

Posted: Sat Oct 22, 2016 8:11 pm
by jacque
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.

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

Posted: Sat Oct 22, 2016 8:43 pm
by DR White
Jacque,

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

Thanks,

David

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

Posted: Sat Oct 22, 2016 8:53 pm
by jacque
We're all slow when we haven't done something before. You're not so special. :)