نحوه ی استفاده از Refresh برای ریسایکلر ویو (نسخه 6+)
Sub Globals
Dim LV As Hitex_LayoutView
Dim RL As Hitex_RefreshLayout
End Sub
Sub Activity_Create(FirstTime As Boolean)
LV.Initializer("LV").ListView.RefreshLayout.ReverseLayout.Build
Activity.AddView(LV,0,0,100%x,100%y)
RL.Initialize(LV, "RL")
RL.Direction = RL.DIRECTION_TOP
RL.SchemeColors = Array As Int (Colors.Red, Colors.Black, Colors.Blue)
LV.Show
End Sub
Sub RL_onRefresh (Direction As Int)
Select (Direction)
Case RL.DIRECTION_TOP:
Log("TOP")
Case RL.DIRECTION_BOTTOM:
Log("BOTTOM")
End Select
End Sub
Sub LV_onCreateViewHolder (Parent As Panel, ViewType As Int) '# onCreate #'
Dim lbl As Label: lbl.Initialize("lbl")
lbl.TextColor = -2 : lbl.TextSize = 18
Parent.AddView(lbl,0,0,100%x,10%y)
End Sub
Sub LV_onBindViewHolder (Parent As Panel, Position As Int) '* onBind *'
Dim lbl = Parent.GetView(0) As Label
lbl.Text = "Hello World ! " & Position
End Sub
Sub LV_GetItemCount As Int '$ ItemCount $'
Return 100 'ItemList.Size
End Sub