Start Viewflipper in a selected item of list

I I tried to make the View Flipper initialize in “image 3” and to call “Show Next” and “Show Previous”, but I did not know to do the blocks. :confused:

1 Like

Thanks for this example. The images are working fine and the buttons too.
Now, the questions are:

  1. How initialize the screen on image 3 of list of View Flipper?
  2. Clicking in button “previous”, the images going to appear one by one until image 1, ok. But if I continue clicking in “previous”, the image 5 appear, making a loop. This happen with button “next” too. How can I stop this loop?

There is no such provision in the default blocks. If you have list of images then decide which one to show first and bring it to the first. Do not enable auto start.

then you have to use block like this. I have tried with three images.
When screen init, images will see. But there will not be autoplay. Only mannual. I hope you can understand the blocks

1 Like

That’s right! I imagined!

Great! I understood your reasoning and your blocks arrangement.
Now, when I click one or two more time in button on first (or last) list item the loop continue…

My blocks:

yeah this is good, and dont forget to do this in designer mode.

image

So you got your answers right??

1 Like

then what you are looking for?
I have designed in such a way user can go forward as well as backward. If you want user to go only in forward direction one at a time mean, remove the previous button. so user can go from 1 to 5 after wards nothing will happen. or if user need to come back from 5 to 1 mean remove the else block for both button. so it will be directed to one direction.

if not set only one for next and remove the else block + pre. so user will stopped at 5th image from teh starting point.

i think you cont do this if you plan to start with image no.3 But it achievable if you follow the above said method

1 Like

Yeah!! Perfect!!

Your blocks are perfect to my case, the images are appearing one by one, from image 1 until the image 5 (clicking in button next) and returning to image 1 (clicking in button previous), like I need.
But I don’t know if I forgot some block, cause if I click in button next in image 5, the image desappear and clicking again, restarts from the first image.

If this is your block then you have not disabled the loop. Compare the else condition of your block with my blocks.

I set false for opposite button to arrest the loop to go back

1 Like

Gowri SankaR, you’re the Man!!!
You found my error that I hadn’t seen. Problem solved!
I really appreciate your help!!

1 Like

If possible mark the desire post as solution :wink::wink::wink:

1 Like

Wait a moment… :sweat_smile:
I noticed the count of global_count never end while I stand clicking in buttons, so global_count will be 1 and 5 just once. What can I do to solve this?

No way. Once the count reached the limit 3 or 0 it won’t proceed(as the buttons are disabled)You need to refresh it to reset it… If you are trying to reset then no need of this blocks because it will leads to the loop

1 Like

It works perfectly in first time, when initialize the screen. So that the count doesn’t stop and the buttons don’t disable anymore. But I need to go to image 5 and back to image 1 several times, without lead to the loop.

i have tried it in comapnion so it may occur. so just add in the screen initialise block as set global count to 0. prob solved.

1 Like

But this way the count will be reset just when initialize the screen or no? Is it possible to put this block set global count to 0 inside the if block? I tried, but I’m not getting it.

let me share my app video to you, it working good to me… wait… uploading

if i do initialise number set it as 1, it mean first image is displaying…

1 Like

@Kiko_Castro , Is this what you are looking for or I am misunderstood your query???

modified and got working fine with 3 images

1 Like

Yeah!!! Great job man!!
Thank you so much for all support!! :clap:
Now I’m going to mark the problem as solved!! :ok_hand:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.