Sub Process_Globals
End Sub
Sub Globals
Dim Recycler As Amir_RecyclerViewPager
Dim b As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Recycler.Initializer("Amir").Horizontal.Build
Activity.AddView(Recycler,0,0,100%x,300dip)
Recycler.DefaultAdapter
Activity.Color=Colors.Black
b.Initialize("b")
b.text="Click me to advance"
Activity.AddView(b,0,300dip,100%x,100dip)
End Sub
Sub b_Click
Recycler.ScrollToPosition(Recycler.CurrentPage+1)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
private Sub Amir_onPageChanging (CurrentPage As Int,NewPage As Int)
Log("Page changing fired")
End Sub
Private Sub Amir_onCreateViewHolder (Parent As Panel,ViewType As Int)
Dim Label As Label
Label.Initialize("")
Parent.AddView(Label,0,0,100%x,300dip)
End Sub
Private Sub Amir_onBindViewHolder (Parent As Panel,Position As Int)
Dim Label As Label = Parent.GetView(0)
Label.TextColor=Colors.White
Label.TextSize=20
Label.Gravity=Gravity.CENTER
Label.Text="ViewPager Item : "&(Position+1)
Parent.Height=300dip
End Sub
Private Sub Amir_GetItemCount As Int
Return 50
End Sub