Page 1 of 1
Creating live sliding cards... possible?
Posted: Tue Aug 09, 2011 12:41 pm
by ctflatt
I am trying to achieve a live sliding card effect for both directions, where from a current card using touch gestures a user can slide right or left without using the push visual effect. From the given card, the view of the previous and next cards would need to be available for a live slide either way.
Is this possible without using transitions? If so, could someone get me started?
Does this even make sense? LOL.
Many thanks!
Todd
Re: Creating live sliding cards... possible?
Posted: Tue Aug 09, 2011 1:54 pm
by Jellicle
I can think of a way, but having gone up that path recently I'm not willing to subject you to the pain it involves...and no, it isn't worth it! Hopefully future updates to LC will bring graphics processing speed gains, and we'll also get better performing scroller objects. Both those thing would make my idea workable.
Gerry
PS How many cards in total?
Re: Creating live sliding cards... possible?
Posted: Tue Aug 09, 2011 2:14 pm
by ctflatt
Gerry:
Thanks for the reply... I started thinking about generating card snapshots on the fly and then replacing them with actual card navigated with no transition, but then my head started spinning, and... LOL...
:Todd
Re: Creating live sliding cards... possible?
Posted: Wed Aug 17, 2011 9:01 pm
by brentj84062
While not the most elegant solution, you could first detect swiping touch motions for left or right swipes on the current card. That would trigger a screenshot of the current card which would then be placed on the card the user will be going to. You immediately jump to that card (no transition) and then use a move command to move the screenshot off screen with the desired animated effect. Purge the screenshot when finished to keep things clean.
I haven't tried this, that's just what comes to mind when I think of the solution you are looking for.
Re: Creating live sliding cards... possible?
Posted: Thu Aug 18, 2011 3:21 pm
by ctflatt
Thanks. That's kind of what I've done.
After thinking about the problem, I created a native scroller that places the preceding/following cards as snapshots into position on a preOpenCard handler. The snapshots are generated fresh with each preOpenCard call as a stack script. I have a go to card script in the scrollerDidScroll handler, which replaces the snapshot with the actual card with no visible transition.
The performance is really pretty good.
Thanks for the input!
Todd
Re: Creating live sliding cards... possible?
Posted: Sun Sep 16, 2012 6:45 am
by oceanatlas
I'm new to the forums and found this thread while poking around. Can you share code for how to make this work? I'm an experienced programmer but I have not worked with scrollers before. Also, will this technique work under iOS? TIA
Re: Creating live sliding cards... possible?
Posted: Mon Sep 24, 2012 2:22 am
by endernafi
Hi,
I assume you want a visual construct like the homepage of TvShowTracker app:
http://itunes.apple.com/us/app/tv-show- ... 65283?mt=8
So, how about using
groups instead of
cards and a native iOS scroller control?
Check out my stack for a simple implementation:
Regards,
~ Ender Nafi Elekcioglu
Re: Creating live sliding cards... possible?
Posted: Thu Oct 04, 2012 5:51 pm
by scotttyang
basically, make 1 card.
use the scroller horizontal scroller
you have to create a group with 3 fields side by side by side horizontally to the size of your card.
scroll horizontally side to side. that simulates the "card" transitioning even though your in one card.
so when the card is open, the middle field is visible. this allow you to slide right and left.
Once you slide Right lets say, then, you have to LOCK SCREEN. then put the content of the 1st field, into the 2nd field. then set the position of the scroll of the middle (2nd field) to (1025) and unlock screen.
do similar when you slide or swipe left.
I'm sure I have a stack someplace with that effect