Android Option List
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Android Option List
Hi
I have started developing an app which has an option list in, when just using it within development this worked fine, but when I tested it on my android phone (Samsung Galaxy Ace) it didn't seem to look good at all. I was wandering whether anyone had investigated this, maybe creating a scrollable list with radio buttons which covers the whole screen? Or I found this topic:
http://forums.runrev.com/viewtopic.php? ... 538#p65392
which shows an option list which looks nicely formatted, but I am not sure how to do this?
Also I want to be able to change the contents and length of the list, so it has to be able to be done in code.
Thanks
Matthew
I have started developing an app which has an option list in, when just using it within development this worked fine, but when I tested it on my android phone (Samsung Galaxy Ace) it didn't seem to look good at all. I was wandering whether anyone had investigated this, maybe creating a scrollable list with radio buttons which covers the whole screen? Or I found this topic:
http://forums.runrev.com/viewtopic.php? ... 538#p65392
which shows an option list which looks nicely formatted, but I am not sure how to do this?
Also I want to be able to change the contents and length of the list, so it has to be able to be done in code.
Thanks
Matthew
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Android Option List
Hi Matthew,
I'd be happy to talk you through how I made that option list.
There is a part outside of liveCode which is the graphics, the ones I used required Photoshop.
Let just start with the buttons and slide motion
New stack with 4 buttons in vertical alignment. Name the bottom 3 Option1, Option2 Option3 and group them. Name the group Option13.
Top button turn off auto hilite and place this code
Now you can see in that the "move" will position the buttons off screen and in a top left position, vary the numbers till it suits your need.
Give that a go and tell me how you get on.
Simon
I'd be happy to talk you through how I made that option list.
There is a part outside of liveCode which is the graphics, the ones I used required Photoshop.
Let just start with the buttons and slide motion
New stack with 4 buttons in vertical alignment. Name the bottom 3 Option1, Option2 Option3 and group them. Name the group Option13.
Top button turn off auto hilite and place this code
Code: Select all
on mouseUp
if the highlite of me = true then
set the highlite of btn "Option1" to false
set the highlite of btn "Option2" to false
set the highlite of btn "Option3" to false
move grp "Option13" from 78,82 to 78,-21 in 0.25 second without messages
set the highlite of me to false
else
set the highlite of me to true
move grp "Option13" from 78,-21 to 78,82 in 0.25 second without messages
end if
end mouseUp
Give that a go and tell me how you get on.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Android Option List
Thanks, I got that working, i must say quite a clever way to get around it! An I guessed that it might have been something such as Photoshop that you had used, and then skinned your buttons. Next, how would I the number of buttons while the app is running, so for example the user adds another item and it appears in the list?
Thanks
Matthew
Thanks
Matthew
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Android Option List
Hi Matthew,
I think that there would be a max number of buttons they can add? If that is true, just add them and set their visibility to false.
Now you are going to have to write some extra code for the top button with if/then or switch/case. You would check to find the vis = true of the lowest button and move the group based on that (you wouldn't want to move the whole grp all the way as it would cause a delay).
Simon
I think that there would be a max number of buttons they can add? If that is true, just add them and set their visibility to false.
Now you are going to have to write some extra code for the top button with if/then or switch/case. You would check to find the vis = true of the lowest button and move the group based on that (you wouldn't want to move the whole grp all the way as it would cause a delay).
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Android Option List
thanks Simon, I'll look into it. it seems odd that there isn't one for mobile!
Thanks
Matthew
Thanks
Matthew
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Android Option List
Where would the fun be if liveCode did everything for us?it seems odd that there isn't one for mobile!
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!