Can LC display a list in a picker view, in Android?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Can LC display a list in a picker view, in Android?

Post by DR White »

Can LC display a list in a picker view, in Android?

How?

Thanks,

David
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Can LC display a list in a picker view, in Android?

Post by jacque »

Sure. See "mobilePick" in the dictionary.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: Can LC display a list in a picker view, in Android?

Post by DR White »

Jacque,

I have spent a couple hours trying to use the information on that topic, but I have not found enough information to create a moblePick using a field, that will work on an Android.

Please refer me to an additional resource or show me an example.

Thanks,

David
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Can LC display a list in a picker view, in Android?

Post by jacque »

Given a field that contains this:

cow
horse
dog
cat

You can use this handler:

Code: Select all

on mouseUp
  mobilePick fld 1,0
  answer "result = " && the result
end mouseUp
The answer dialog will return the line number that was chosen. This is the simplest example, you can also add Cancel or Done buttons.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: Can LC display a list in a picker view, in Android?

Post by DR White »

Jacque,

That works Good!

Is there a way to control the the Height and Width of the picker?

Thanks,

David
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Can LC display a list in a picker view, in Android?

Post by jacque »

The appearance of the picker is controlled by the OS, so you get the same standardized size that all apps use.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
Post Reply