thanks to all who assisted me, i really i appreciate. the code is now working but i am having another problem, the problem is when a user click on the customlistview it will send the value to the next page which is okay but when they navigate back the customlistview to select another record it will still be showing the first record that was selected before navigating back to clv. this is my code
Private xclv As CustomListView
Dim parser As JSONParser
parser.Initialize(Job.GetString)
Dim Rootx As List = parser.NextArray
Dim parser As JSONParser
parser.Initialize(Job.GetString)
Dim Rootx As List = parser.NextArray
For Each colroot As Map In Rootx
' Dim msg As String = colroot.Get("msg")
Dim date As String = colroot.Get("date")
' Dim rstatus As String = colroot.Get("rstatus")
Dim subject As String = colroot.Get("subject")
Dim rkey As String = colroot.Get("rkey")
Dim status As String = colroot.Get("status")
Dim total_reply As Int = colroot.Get("total_reply")
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(100,0,0,100%x,140dip)
p.LoadLayout("support_iterms")
Lb_subject.Text= subject
Lb_date.Text = date
lbtreply.Text= total_reply
' Lb_id.Text=rkey
If status=="0" Then
Lb_status_pending.Visible=True
Else If status=="1" Then
Lb_status_read.Visible =True
End If
xclv.Add(p, rkey)
Private Sub xclv_ItemClick (Index As Int, Value As Object)
Dim pageAnother As support_details
pageAnother.Initialize
pageAnother.myVariable= Value
B4XPages.AddPage("anotherPage", pageAnother)
B4XPages.ShowPageAndRemovePreviousPages ("anotherPage")
'Log(Value)
End Sub
this code below is for next page that show more details of the clicked value
Public myVariable As String
Private xclv As CustomListView
Dim parser As JSONParser
parser.Initialize(Job.GetString)
Dim Rootx As List = parser.NextArray
For Each colroot As Map In Rootx
Dim msg As String = colroot.Get("msg")
Dim date As String = colroot.Get("date")
'Dim rstatus As String = colroot.Get("rstatus")
Dim subject As String = colroot.Get("subject")
Dim r_msg As String = colroot.Get("r_msg")
'Dim rkey As String = colroot.Get("rkey")
Dim r_date As String = colroot.Get("r_date")
Dim r_admin As String = colroot.Get("r_admin")
' Dim status As String = colroot.Get("status")
' Dim total_reply As Int = colroot.Get("total_reply")
Lb_subject.Text = subject
Lb_msg.Text = msg
lbdate.Text = date
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(100,0,0,100%x,145dip)
p.LoadLayout("support_replies_item")
Lb_rsubject.Text = r_msg
Lb_rdate.Text = r_date
If r_admin="1" Then
Lb_admin.Visible=True
End If
xclv.Add(p, "")
Next
Private Sub lb_nav_Click
Dim back_support As support
back_support.Initialize
'myVariable=""
B4XPages.AddPage("back_support", back_support)
B4XPages.ShowPageAndRemovePreviousPages ("back_support")
End Sub