Bug? GetAllViewsRecursive and StdViewPager problem

Jerez

Active Member
Licensed User
Longtime User
Hi,

I've a StdViewPager with 6-7 pages. Each page has views based in same layout.

I need to iterate in all Views looking for a specific Tag contained inside of a StdViewPager.

If i go to page 3 for example and then iterate with GetAllViewsRecursive just found Views contained in current page and in best case the contiguous page.

If i go to page 4 and iterate again then GetAllViewsRecursive found the view.

NOTE: I've changed the StdViewPaget with an HorizontalScrollView and GetAllViewsRecursite works perfect... but when it is 'swiped' scroll to infinite... any way to stop in each panel? simulating scroll page by page?


Thanks !

B4X:
For Each v As View In Activity.GetAllViewsRecursive
if v is Imageview then
    dim iv as imageview = v
    [...]
end if
Next
 
Last edited:

Jerez

Active Member
Licensed User
Longtime User
I think that is a bug.

An example:

Left side: StdviewPager...GetallViewsRecursive cannot get all views.
Right side: HorizontalScrollView... GetallViewsRecursive get all views with sucess!

NOTE: I would stay with the HorizontalScrollView but do not know how to advance page by page ...
 
Last edited:

Jerez

Active Member
Licensed User
Longtime User

Check it again please.

I found the right way:

B4X:
For x = 0 To vp.Panels.Length -1
          
      For Each p As View In vp.Panels(x).GetAllViewsRecursive
          [...]
     Next
Next
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…