Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Main")
TabStrip1.LoadLayout("Page1", "")
TabStrip1.LoadLayout("Page2", "")
TabStrip1.LoadLayout("Page3", "")
For i = 1 To 100
Page3ListView1.AddSingleLine($"Item ${i}"$)
Next
Dim jo As JavaObject = TabStrip1
Dim event As Object = jo.CreateEventFromUI("android.support.v4.view.ViewPager.OnPageChangeListener", "PageChangeListener", Null)
jo.GetFieldJO("tabStrip").RunMethod("setOnPageChangeListener", Array(event))
End Sub
Sub TabStrip1_PageSelected (Position As Int)
Log($"Current page: ${Position}"$)
End Sub
Sub PageChangeListener_Event (MethodName As String, Args() As Object) As Object
Log("Method: " & MethodName)
Dim ArgsList As List = Args
Log("Args: " & ArgsList)
Return Null
End Sub