Scrolling Groups on touch Screens

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
mattrgs
Posts: 37
Joined: Tue May 28, 2013 1:41 pm

Scrolling Groups on touch Screens

Post by mattrgs » Thu Oct 31, 2013 10:41 pm

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

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Scrolling Groups on touch Screens

Post by Simon » Thu Oct 31, 2013 10:52 pm

Hi Matthew,
How about this lesson?
http://lessons.runrev.com/s/lessons/m/4 ... ll-a-field

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

mattrgs
Posts: 37
Joined: Tue May 28, 2013 1:41 pm

Re: Scrolling Groups on touch Screens

Post by mattrgs » Thu Oct 31, 2013 10:59 pm

Simon wrote: How about this lesson?
http://lessons.runrev.com/s/lessons/m/4 ... ll-a-field
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.
Matthew

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Scrolling Groups on touch Screens

Post by Simon » Thu Oct 31, 2013 11:03 pm

hmmm... I'm seeing momentum
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!

mattrgs
Posts: 37
Joined: Tue May 28, 2013 1:41 pm

Re: Scrolling Groups on touch Screens

Post by mattrgs » Thu Oct 31, 2013 11:09 pm

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

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Scrolling Groups on touch Screens

Post by Simon » Thu Oct 31, 2013 11:16 pm

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
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

mattrgs
Posts: 37
Joined: Tue May 28, 2013 1:41 pm

Re: Scrolling Groups on touch Screens

Post by mattrgs » Sat Nov 02, 2013 9:33 pm

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

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Scrolling Groups on touch Screens

Post by Simon » Tue Nov 05, 2013 8:03 am

Hi Matthew,
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!

mattrgs
Posts: 37
Joined: Tue May 28, 2013 1:41 pm

Re: Scrolling Groups on touch Screens

Post by mattrgs » Tue Nov 05, 2013 8:23 am

I tested it on my Galaxy Ace

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”