Hello,
I am using the HorizontalViewPager extension to view a contents of many VerticalArrangement components (VerticalArrangement2, VerticalArrangement3, and VerticalArrangement4 in my app), if I like to use many VerticalArrangements, can I create a list of these VerticalArrangements?! and so create a list of its contents (Label1, Label2 and Label3...) ! and then call each label in its related VerticalArrangement?
Sorry, I mean the contents of the VerticalArrangements which is the Label inside VerticalScrollArrangement as shown in attached image...
I hope you got it.
Thank you.
I will try to explain it...
You may have noticed that each page of the three pages in the app falls under VerticalArrangement..
What I want to do is make a list of VerticalArrangement so that I can add any number of pages automatically without adding VerticalArrangement each time I need to add page?! is it possible?
I hope I was able to explain it this time!
Thank you.
Ah, ok. Yes, you can do that.
All you have to do is add every item in a list, and call the .AddComponent functioning in a for loop iterating over that list. The component attribute can be selected from the list using the select list block.
I don't have the extension as I'm not able to download it, could somebody represent this in blocks, please?
Edit: The code will look something like this. Please make sure you replace "set VerticalArrangement.Height" to "call HorizontalViewPager1.AddComponent" since I don't have the extension:
Yes it's possible, but since a view can have only one parent so component will only be added to last called parent.
But I think I misunderstood what you asked.
Thank you everyone..
Sorry..
I created a new post that included the latest in this work, and changed the title of the post to be more indicative of the project and the desired. (Book App Template Project)
Please continue there with my best regards and thanks!
Simply I am trying to design a simple application as a template for displaying the textual content of any book..
I designed an app with only 3 pages, using the HorizontalViewPager extension..
Each of these 3 pages consists of 3 components VerticalArrangement, VerticalScrollArrangement and Label..
What I'm thinking of and would like to collaborate on is to put a code to create any number of pages automatically, so that I don't need to add these three components manually every time I want to add a page to the book!
I think it would be difficult or even impossible for any one to repeat these steps if the book was 100 pages or 300
Hopefully have it figured out for you. I have made use of the scrollto block and the page changed block to handle content changes. In essence if you swipe right, your are scrolled back to the middle page and the content is set to the next page in the book, if you swipe left the same happens in reverse.
[EDIT - UPDATE: now shows next and previous pages during swipe]