Scrolling Groups on touch Screens
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Scrolling Groups on touch Screens
Hi
I want to create a long list of buttons (longer than the stack) and then be able to scroll them up and down. I've seen various solutions but so far none have worked. I want to create this app for both android and iphone so something that works on both would be best. I would also like to have the momentum scrolling effect so if you scroll with a flick it keeps on going for a short period of time. Another thing is I have buttons at the top and bottom of the screen which I don't want to move, but i assume these are fine if they aren't in the same group as the scrolling buttons.
Could someone please give me a concise answer on how to code this.
Thanks in advance to anyone who answers.
Matthew
I want to create a long list of buttons (longer than the stack) and then be able to scroll them up and down. I've seen various solutions but so far none have worked. I want to create this app for both android and iphone so something that works on both would be best. I would also like to have the momentum scrolling effect so if you scroll with a flick it keeps on going for a short period of time. Another thing is I have buttons at the top and bottom of the screen which I don't want to move, but i assume these are fine if they aren't in the same group as the scrolling buttons.
Could someone please give me a concise answer on how to code this.
Thanks in advance to anyone who answers.
Matthew
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Scrolling Groups on touch Screens
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Scrolling Groups on touch Screens
I had seen this but this doesn't include 'momentum' scrolling which I want to include as it is a key feature of the app so needs to look nice.Simon wrote: How about this lesson?
http://lessons.runrev.com/s/lessons/m/4 ... ll-a-field
Matthew
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Scrolling Groups on touch Screens
hmmm... I'm seeing momentum
If you mean by momentum it keeps scrolling after a flick.
Simon
If you mean by momentum it keeps scrolling after a flick.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Scrolling Groups on touch Screens
Oh ok, sorry, I'm quite new, so couldn't see the code for it, is it all within the bit below?:
on scrollerDidScroll hOffset, vOffset
// When the user scrolls move the displayed content
set the vScroll of group "scrollArea" to vOffset
end scrollerDidScroll
Matthew
on scrollerDidScroll hOffset, vOffset
// When the user scrolls move the displayed content
set the vScroll of group "scrollArea" to vOffset
end scrollerDidScroll
Matthew
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Scrolling Groups on touch Screens
Not sure that's the only bit of code. While it does move the field I think that the native scroller does the momentum by it self.
Simon
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Scrolling Groups on touch Screens
I completed this tutorial, but it has created a scroller which is really slow and doesn't work half of the time, can someone please suggest a solution.
Matthew
Matthew
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Scrolling Groups on touch Screens
Hi Matthew,
Did you test this on a device or just the simulator?
Simulator is much less accurate.
Simon
Did you test this on a device or just the simulator?
Simulator is much less accurate.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Scrolling Groups on touch Screens
I tested it on my Galaxy Ace