سلام
من از کتابخانه خوبتون استفاده میکنم. فقط الان یه مشکل برام پیش اومده اونم اینه که متن هایی رو که میخوام به ترتیب لود کنه رو به ترتیب لود نمی کنه
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim sql As SQL
End Sub
Sub Globals
Dim pr As PersianRecyclerLayout
Dim su As StringUtils
Dim cur As Cursor
Private lblpyamaktext As Label
Private lbltitr As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
If(File.Exists(File.DirInternal , "book10v(2.0.2)") = False)Then
File.Copy(File.DirAssets , "book10v(2.0.2).db" , File.DirInternal , "book10v(2.0.2).db")
End If
sql.Initialize(File.DirInternal , "book10v(2.0.2).db" , True)
cur= sql.ExecQuery("SELECT * FROM TblText WHERE IDzFasl = 2 AND IDzGoftar = 1 AND IDzBakhsh = 1")
pr.Builder("pr").NormalRecycler.BALayout.ListView.RecyclerView.Build
Activity.AddView(pr , 0 , 0 , 100%X , 100%Y)
pr.ShowRecycler
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub pr_getItemCount As Int
Return cur.RowCount
End Sub
Sub pr_onCreateViewHolder(layoutitem As Object,viewtype As Int) As Object
Dim mainpanel As Panel = layoutitem
mainpanel.LoadLayout("l")
cur= sql.ExecQuery("SELECT * FROM TblText WHERE IDzFasl = 2 AND IDzGoftar = 1 AND IDzBakhsh = 1")
Return Null
End Sub
Sub pr_onBindViewHolder(layoutitem As Object,position As Int,viewtype As Int) As Object
Dim mainpanel As Panel = layoutitem
mainpanel.Width = 100%X
mainpanel.Height = 50%Y
cur.Position = position
lblpyamaktext.Text = cur.GetString("Text")
lblpyamaktext.TextColor = Colors.Black
lblpyamaktext.Height = su.MeasureMultilineTextHeight(lblpyamaktext , lblpyamaktext.Text)
Log(position)
Log(cur.GetString("Text"))
Return mainpanel
End Sub
Sub pr_OnItemClick(ItemTag As Object,viewclicked As Object,position As Int)
Log(ItemTag)
End Sub
این هم کد هام هست در ضمن لاگ هم که می گیرم لاگ ها هیچ مشکلی نداره و کاملا درسته منتهااشتباه در لیبل لود میکنه دلیلش رو نمیدونم.
ممنون میشم راهنمایی کنید