Banner Horizontal View Sliding

[sharedmedia=core:attachments:5409]

Hello Guys!. Kindly help me in creating my new mobile application. I want to create a automatic banner photo like in the picture above. I made a sliding view but that’s not automatic in sliding. Is there any plugin or someone know how to do it? Thaank you!

There is an image slider example sample app in the sample code that ships with Corona:

SampleCode/Interface/SlideView

You can adapt that code to your needs.

Rob

Hello Rob, yes I already made a sliding view, but do you know how can I make it automatic sliding? thanks

 

Perhaps you could use timer.performWithDelay() (https://docs.coronalabs.com/api/library/timer/performWithDelay.html) to have it switch every few seconds. You probably would have to look at whatever code is in the touch handler for swiping, and duplicate it. Maybe you can pull the code that actually changes the slide out to it’s on function if it’s inside the swipe handler (it’s been a while since I looked at that code) and have the touch event call the function that way your timer could also call the function without having to duplicate the code.

Rob

There is an image slider example sample app in the sample code that ships with Corona:

SampleCode/Interface/SlideView

You can adapt that code to your needs.

Rob

Hello Rob, yes I already made a sliding view, but do you know how can I make it automatic sliding? thanks

 

Perhaps you could use timer.performWithDelay() (https://docs.coronalabs.com/api/library/timer/performWithDelay.html) to have it switch every few seconds. You probably would have to look at whatever code is in the touch handler for swiping, and duplicate it. Maybe you can pull the code that actually changes the slide out to it’s on function if it’s inside the swipe handler (it’s been a while since I looked at that code) and have the touch event call the function that way your timer could also call the function without having to duplicate the code.

Rob