Android scroller

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

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

Post Reply
brotee
Posts: 30
Joined: Sat Mar 12, 2016 9:15 am

Android scroller

Post by brotee » Wed Jul 18, 2018 10:18 pm

I'm using native scrollers, but it's lagging, i have pretty good android Phone (Samsung S8)

It's a group of fields, only text. i've set scrolling mode to the group and tried acceleratedrendering, but no luck, it seems it doesnt even change when i set scrolling mode, or acceleratedrendering.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4666
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Android scroller

Post by jacque » Thu Jul 19, 2018 5:44 pm

You're on the right track, acceleratedRendering must be in effect and the layermode must be "scrolling". However, only the topmost control is affected. Since your fields are in a group they are not candidates, the group itself is. The solution is to either ungroup the fields and scroll each one individually (if the text is longer than the field height) or scroll the entire group as a unit.

Edit : I guess the whole group is what you're doing already. When do you set acceleratedRendering? OpenStack? Preopencard?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

brotee
Posts: 30
Joined: Sat Mar 12, 2016 9:15 am

Re: Android scroller

Post by brotee » Thu Jul 19, 2018 11:22 pm

i set in preopenstack

but i don't get it, i have attached 2 screens, so the group i want to scroll is the topmost, it contains lot of fields and some graphics too

i start preopenstack with:
set the acceleratedRendering of this stack to true

and i have checked hardware accelerate in standalone settings

layermode of the group i want to scroll is "scrolling"

i can't ungroup these controls in this case i think
Attachments
scroller3.png
scroller.png

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4666
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Android scroller

Post by jacque » Fri Jul 20, 2018 12:24 am

I see. Another requirement is that the group must be "unadorned" -- which means, no scrollbar or borders. Try removing the scrollbar. When I'm developing I use this in a preOpenStack handler:

Code: Select all

set the vScrollbar of grp x to (the environment = "development")
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

brotee
Posts: 30
Joined: Sat Mar 12, 2016 9:15 am

Re: Android scroller

Post by brotee » Fri Jul 20, 2018 1:22 am

Yep that helped, i only set the scrollbarwidth to 0 on mobile, but seems i need to turn off

it's way better now, but if u check decelerate, it's still laggy, can i do anything with that or that's the max :)

https://www.youtube.com/watch?v=g-ErDgc ... e=youtu.be

ty for your helping anyway :)

brotee
Posts: 30
Joined: Sat Mar 12, 2016 9:15 am

Re: Android scroller

Post by brotee » Fri Jul 20, 2018 2:00 am

youtube deleted my video :( :shock:

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4666
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Android scroller

Post by jacque » Fri Jul 20, 2018 6:09 am

With some complicated groups I do see some lag but others sometimes work smoothly. I haven't figured out what causes some scrollers to do that. Just in case, make sure none of the inside controls have a layermode set, they should all be static.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4666
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Android scroller

Post by jacque » Fri Jul 20, 2018 7:22 pm

I just happened to think, are there subgroups inside the main group? If so, I've found that can slow down scrolling. I usually keep all the content inside the group as independent controls without any subgroups.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

brotee
Posts: 30
Joined: Sat Mar 12, 2016 9:15 am

Re: Android scroller

Post by brotee » Fri Jul 20, 2018 9:27 pm

yes there are, but its pretty good now, except decelerating, its not a big problem

you helped me alot :) ty

Post Reply

Return to “Android Deployment”