#Region Project Attributes
#ApplicationLabel: AX_RecyclerView
#VersionCode: 1
#VersionName: 1.00
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#BridgeLogger : true
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
End Sub
Sub Globals
Dim Recycler As AX_RecyclerView
End Sub
Sub Activity_Create(FirstTime As Boolean)
Recycler.Initializer("Amir").ListView.Build
Activity.AddView(Recycler,0,0,100%x,100%y)
Dim Adapter As AX_RVAdapter
Adapter.Initialize("Amir",Adapter.LOOP_NEVER)
Recycler.Adapter=Adapter
Activity.Color=Colors.White
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Private Sub Amir_onCreateViewHolder (Parent As Panel,ViewType As Int)
Dim Panel As Panel
Panel.Initialize("")
Parent.AddView(Panel,10dip,10dip,Parent.Width-20dip,190dip)
Dim img As ImageView
img.Initialize("")
Panel.AddView(img,0,0,Panel.Width,Panel.Height)
Dim Title As Label
Title.Initialize("")
Panel.AddView(Title,20dip,20dip,Panel.Width-40dip,50dip)
Dim Text As Label
Text.Initialize("")
Panel.AddView(Text,20dip,Panel.Height-100dip,Panel.Width-40dip,100dip)
End Sub
Private Sub Amir_onBindViewHolder (Parent As Panel,Position As Int)
Dim Panel As Panel = Parent.GetView(0)
Panel.Color = Colors.White
Panel.Elevation=4dip
Dim img As ImageView = Panel.GetView(0)
Dim Title = Panel.GetView(1) , Text = Panel.GetView(2) As Label
Dim Color2 As ColorDrawable
Color2.Initialize(Colors.DarkGray,0)
img.Background = Color2
Title.TextColor=Colors.White
Title.TextSize=35
Title.Text="Item : "&(Position+1)
Text.TextColor=Colors.White
Text.TextSize=14
Text.Text="Do one thing at a time, and do well.Keep on going never give up. Whatever Is worth doing Is worth doing well.I can because i think i can.Jack of all trades And master of none."
Parent.Height=210dip
'Parent.Width=100%x
LoadImage(img,Position)
End Sub
Private Sub LoadImage (Img As ImageView,Position As Int)
Dim Glide As Amir_Glide
Glide.Initializer.Default
Dim Color2 As ColorDrawable
Color2.Initialize(Colors.DarkGray,0)
Glide.RequestManager.SetDefaultRequestOptions(Glide.RO.ErrorDrawable(Color2).FallBack(Color2).Placeholder(Color2).CenterCrop)
Select Case Position
Case 0
Glide.Load("http://s9.picofile.com/file/8333943434/skid_right_1.gif").Apply(Glide.RO.CenterCrop).Into(Img)
Case 1
Glide.Load("http://s9.picofile.com/file/8333943450/skid_right_2.gif").Apply(Glide.RO.CenterCrop).Into(Img)
Case 2
Glide.Load("http://s9.picofile.com/file/8333943468/skid_right_3.gif").Apply(Glide.RO.CenterCrop).Into(Img)
Case 3
Glide.Load("http://s8.picofile.com/file/8333943492/skid_right_4.gif").Apply(Glide.RO.CenterCrop).Into(Img)
Case 4
Glide.Load("http://s9.picofile.com/file/8333943518/skid_right_5.gif").Apply(Glide.RO.CenterCrop).Into(Img)
Case 5
Glide.Load("http://s8.picofile.com/file/8333943526/skid_right_6.gif").Apply(Glide.RO.CenterCrop).Into(Img)
End Select
End Sub
Private Sub Amir_GetItemCount As Int
Return 6
End Sub