I think i don't understand this very well.Declare all CustomListViews as process global variables and they will work properly.
I need to make something like this.
B4X:
Sub ListViewCats_ItemClick (Index As Int, Value As Object)
Reader.Concerned = PG.Title
Reader.Subcat = Value
Reader.Show
End Sub
This is my show code in reader
B4X:
Public Sub Show
Main.NavControl.ToolBarVisible = False
btnBack.InitializeText("Previous","Previous")
If PG.IsInitialized = False Then
PG.Initialize("PG")
PG.RootPanel.LoadLayout("mainreader")
PG.RootPanel.Color = Colors.White
pnlContent.LoadLayout("readerlayout")
PG.HideBackButton = True
End If
Main.NavControl.ShowPage(PG)
ListViewCats.Clear
PG.Title = "Learn Arabic" & " V " & Utils.GetVersion
lblMenu.Text = Concerned
lblSousMenu.Text = Subcat
Timer1.Initialize("Timer1",1)
ImageView1.Bitmap = Utils.ResizeImage (LoadBitmap(File.DirAssets,"play.png"),ImageView1.Width,ImageView1.Height)
FillListView(Concerned,Subcat)
End Sub
First time it displays correctly but when i come for the second time.Items are not displayed correctly and the third time items are not visible at all.What are the best practices when you have to do such actions ?