Awkward Option Menu

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm
Location: Seattle, USA

Awkward Option Menu

Post by townsend » Wed Jul 20, 2011 9:25 pm

It seems the Option Menu control does not work on the Android Platform.
But when the menuMode is changed to PullDown or PopUp, then it works fine.
Kind of-- but it's very awkward-- because the selection process fills the screen.
121 pulldown menu.JPG
Are there any alternatives?
Native Controls?
Can MobGUI do any better?

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: Akward Option Menu

Post by BarrySumpter » Thu Jul 21, 2011 7:56 am

I thinks thats the standard for Android.

On your Android device goto Settings.
And you'll see the options list fills the screen with more avaiable on scroll down.

my thought was to see if the option menu will allow you to change font size and color on the fly.
Otherwise write a standard card for multi select etc.
I think I wrote about this last week but havn't chased this down to see if anyone else has already submitted a solution.
We might be able to enhance the standard message box card (sorry I can't remember who from RunRev posted it)

I had a good look at mobGUI last week.
My opinion from my tests is that modGUI is NOT ready for Android as yet.
Lots of promise though and I'm really looking forward to an Android version of mobGUI.
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm
Location: Seattle, USA

Re: Awkward Option Menu

Post by townsend » Thu Jul 21, 2011 10:37 pm

The solution to this problem is to use the the Scrolling List Field instead. It works fine. Just as the normal Option Menu, takes two clicks to make a selection, so does this method. One Click on a button to initiate the selection. Then have a Scrolling List Field become visible. Another click to make the selection. Which makes the popup invisible again, and places the selected text in the original Button Label. Or if you have more selections that will fit on the screen, which requires scrolling, have the lost focus Message make the popup Scrolling List Field invisible again.

I haven't done this yet, but my tests show it will work.

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: Awkward Option Menu

Post by BarrySumpter » Thu Jul 21, 2011 11:46 pm

Can you post your test in a complete .rev project here?

I'd like to see where you're coming from.
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm
Location: Seattle, USA

Re: Awkward Option Menu

Post by townsend » Fri Jul 22, 2011 12:05 am

All I did was throw some controls on that old TestingOrientation stack.

Like I said, I haven't coded the solution, but here is that test. All it does, is prove the Scrolling list box can be made invisible without interfering with content underneath. And that the height and Size properties can be modified with code and instantly visible.
121 test stack.JPG
121 test stack.JPG (22.64 KiB) Viewed 5999 times
Attachments
TestingOrientation.zip
(2.01 KiB) Downloaded 353 times

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: Awkward Option Menu

Post by BarrySumpter » Fri Jul 22, 2011 1:21 am

Cool!
Now I see where you're coming from.

Thanks for posting that.

I'll have a play.

The other thing I was thinking was how to cancel that selection.

I did read a post or sample app about trapping the back button.

I wonder if LC has a LostFocus event?
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm
Location: Seattle, USA

Re: Awkward Option Menu

Post by townsend » Fri Jul 22, 2011 3:44 pm

The current selection should already be highlighted.
The "lost focus" event should be ideal for a cancel.
I put the word focus into the Dictionary search, and found the Message.

Code: Select all

on FocusOut
     --close down Scrolling List
end FocusOut

Post Reply

Return to “Android Deployment”