V0.25 - android scroller
Moderators: heatherlaine, kevinmiller, robinmiller, malte, splash21
-
- VIP Livecode Opensource Backer
- Posts: 369
- Joined: Sun Dec 19, 2010 1:10 am
- Location: UK
- Contact:
V0.25 - android scroller
The main change is a new general purpose scroller for android (although it should work just as well with iOS). It's a first draft, so I'm looking for feedback and suggestions - especially performance on real devices. Horizontal scrolling, vertical scrolling and both are supported with optional bounce. I've been testing on the android simulator (which is pretty slow!) and performance has been acceptable so far. There will no doubt be lots of room for improvement, but hopefully it's a good start.
Have fun!
Have fun!
LiveCode Development & Training : http://splash21.com
Re: V0.25 - android scroller
Ive tested this on the ZTE Blade running 2.3, and Samsung Galaxy Apollo running 2.2 and it works very well on both, id say it almost appears better than the scroller running on the iPhone 3 so ill give it a go on that as well and see if that is the case!
Andy
Andy
Re: V0.25 - android scroller
Just a quick update.
The scroller works well at scrolling, but there is an odd behaviour when you go back to a card that has a scroller on it.
For example, if you have a start card (1), then go to a sub card (2) with a scroller and a button. Button takes to back to card 1, then you go back to card 2 again, the scroller is no longer able to scroll right to the bottom or top.
Would it be possible to add a function to destroy the scrollers when the card is closed so they can be reset from scratch just like the first time you go to the card?
The scroller works well at scrolling, but there is an odd behaviour when you go back to a card that has a scroller on it.
For example, if you have a start card (1), then go to a sub card (2) with a scroller and a button. Button takes to back to card 1, then you go back to card 2 again, the scroller is no longer able to scroll right to the bottom or top.
Would it be possible to add a function to destroy the scrollers when the card is closed so they can be reset from scratch just like the first time you go to the card?
Re: V0.25 - android scroller
Sorry, the last post was probably as clear as mud!
Ive updated your demo stack to show the problem by adding a start card and uploaded it to...
http://byoni.on-rev.com/livecode/Scroll ... obDemo.zip
If you try this stack in either the iOS or Android emulator, click on the button on the front card to load the scroller and everything is good.
Click back to return to the first card, then the button again to return to the scroller and try using the A-Z bar at the side or scroll to see the problem, when you try to scroll the contacts will usually disappear until you scroll right down, its like the top is being set incorrectly.
Andy
Ive updated your demo stack to show the problem by adding a start card and uploaded it to...
http://byoni.on-rev.com/livecode/Scroll ... obDemo.zip
If you try this stack in either the iOS or Android emulator, click on the button on the front card to load the scroller and everything is good.
Click back to return to the first card, then the button again to return to the scroller and try using the A-Z bar at the side or scroll to see the problem, when you try to scroll the contacts will usually disappear until you scroll right down, its like the top is being set incorrectly.
Andy
-
- VIP Livecode Opensource Backer
- Posts: 369
- Joined: Sun Dec 19, 2010 1:10 am
- Location: UK
- Contact:
Re: V0.25 - android scroller
Thanks, Andy - I see what you mean! MobGUI is remembering the location of the scroller contents - which you may want, so they could reposition on orientation change, etc. You should be able to work around this by saving the vscroll of the scroller and the top of the field when the card closes and restoring those values when the card opens. I'll have another look and try to find a way that would be a bit friendlier
LiveCode Development & Training : http://splash21.com
Re: V0.25 - android scroller
Yes, I thought that might be the case.
Unfortunately Im using the scroller on a card ive created for a psuedo picker, so the contents change each time its called.
Maybe setting the vscroll to 0 before the card closes, the disabling the frontscript will help, Ill try that!
Thanks again.
Andy
Unfortunately Im using the scroller on a card ive created for a psuedo picker, so the contents change each time its called.
Maybe setting the vscroll to 0 before the card closes, the disabling the frontscript will help, Ill try that!
Thanks again.
Andy
Re: V0.25 - android scroller
Bingo!
The following code fixes the problem, thanks again for putting me on the right path!!
Andy
The following code fixes the problem, thanks again for putting me on the right path!!
Code: Select all
on closeCard
set the vscroll of grp "Scroller" to 0
mobGUIScrollers false
end closeCard
-
- Posts: 1201
- Joined: Sun Apr 24, 2011 2:17 am
Re: V0.25 - android scroller
Can't seem to get this demo to work on win32 or HTC HD2 physical device.
The "Open Scroller Card" button doesn't respond.
I wonder if this is for LC v5 only? As I am developing in LC v4.6.4.
Edit: LOL, yeah OK. Forgot how fun LC is.
The "Open Scroller Card" button doesn't respond.
I wonder if this is for LC v5 only? As I am developing in LC v4.6.4.
Edit: LOL, yeah OK. Forgot how fun LC is.
Code: Select all
on touchEnd pId
mobGUIUntouch the long id of me
# LC5 : new visual effect syntax
--lock screen for visual effect
go card "ScrollerCard"
wait for 0 millisecs with messages
unlock screen with visual effect "push left very fast"
end touchEnd
All my best,
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.
Barry G. Sumpter
Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.