Hi
this question concerns a particular usage of TabStripViewPager. From documentation I see that I can only add pages using designer. Now, let's suppose that I have n-pages to add, all equal, with same controls, for example a ListView. Doing this means to apply LoadLayout n times. Therefore, I started from the example:
www.b4x.com
In the example, 3 different pages are loaded. Instead, I always loaded the same, namely the third page, which has a ListView. I was (wrongly) expecting the list of page 3 to appear in all the 3 pages. What happens is that the list appears only on the third page. I guess that this first example is related to my problem and may be used as an introductory question: why the list appears only on 3rd page?
Then my question is more sophisticate : I have several Pages, each one displaying same List (loaded as a Layout). Of course the Object is the same, but I don't see a way to have a list per each page, being only able to put the list on the page by LoadLayout. I don't see any function to retrieve the ListView object and store it elsewhere (for example in a global List), once it is created by the LoadLayout. In other words, my need is to work on the ListView of each page, selecting the items etc. What I have seen that if I select an item of the ListView in the visible page, while the ItemClick is fired on the right row, the actual ListView is always that of the last page. This is obvious, but, exactly, how to overcome this problem? Again in other words: how to have n Pages, with n ListViews and have a different row selection in each one? Let's suppose I select the 2nd row in first page, and the 4th in the second page. I store the two selections. When I change page, i need to see two different selections ..
Hope to have explained. Thanks in advance for any hint. I attach a test project for the first question. It is the same of the abovementioned link, just loading only 3rd page.
this question concerns a particular usage of TabStripViewPager. From documentation I see that I can only add pages using designer. Now, let's suppose that I have n-pages to add, all equal, with same controls, for example a ListView. Doing this means to apply LoadLayout n times. Therefore, I started from the example:
TabStripViewPager - Better ViewPager
This library is based on the following open source project: https://github.com/astuetz/PagerSlidingTabStrip License: http://www.apache.org/licenses/LICENSE-2.0 It is an alternative to StdViewPager. It is simpler to use and looks better. It is implemented as a custom view. It requires B4A v5.8+...
In the example, 3 different pages are loaded. Instead, I always loaded the same, namely the third page, which has a ListView. I was (wrongly) expecting the list of page 3 to appear in all the 3 pages. What happens is that the list appears only on the third page. I guess that this first example is related to my problem and may be used as an introductory question: why the list appears only on 3rd page?
Then my question is more sophisticate : I have several Pages, each one displaying same List (loaded as a Layout). Of course the Object is the same, but I don't see a way to have a list per each page, being only able to put the list on the page by LoadLayout. I don't see any function to retrieve the ListView object and store it elsewhere (for example in a global List), once it is created by the LoadLayout. In other words, my need is to work on the ListView of each page, selecting the items etc. What I have seen that if I select an item of the ListView in the visible page, while the ItemClick is fired on the right row, the actual ListView is always that of the last page. This is obvious, but, exactly, how to overcome this problem? Again in other words: how to have n Pages, with n ListViews and have a different row selection in each one? Let's suppose I select the 2nd row in first page, and the 4th in the second page. I store the two selections. When I change page, i need to see two different selections ..
Hope to have explained. Thanks in advance for any hint. I attach a test project for the first question. It is the same of the abovementioned link, just loading only 3rd page.