Android Question Scrollview B4I alternative for B4A

wl

Well-Known Member
Licensed User
Longtime User
Hi,

I'm currently using a Scrollview in B4 to swipe between 2 "screens" (horizontally) and I'm using

B4X:
    noPageControl = noPageControl.Initialize("UIPageControl").RunMethod("new", Null)
    PageControl = noPageControl
    Page1.RootPanel.AddView(PageControl, 0, 80%y, 100%x, 40dip)
    noPageControl.SetField("numberOfPages", panels.Size)
    noPageControl.SetField("enabled", False)

to display the "screen" I'm currently on. Property 'paging enabled" and "bounces" are set to TRUE.

What's the best alternative in B4A / Android ?

Thanks
 

wl

Well-Known Member
Licensed User
Longtime User
Thanks Klaus.

Great !

Any suggestion on how to add something like an indicator of the page you are on (something similar as the circles on an iOS device) ?
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
You need to do it on your own.
It cold be:
- A transparent Panel and you draw the different dots on it.
- An ImageView with images.
- A Label with different text.

The PageIndex is calculated in the ScrollFinish routine.
You should declare this variable in the Globals routine.
 
Upvote 0
Top