Hello fellow gurus! I come groveling to the masters to solve a stange problem:
I am trying to initialize a series of ListViews (16 of them). I am initializing all but one of them invisibly (only the first one is visible/enabled). Depending on what the user does, each of the listviews enable/disable and become visible/invisible to quickly alternate between them (to produce a live menu feel, like navigating a tree).
Example of how I'm initializing the ListViews:
However, upon running the app, I get this as the 5th ListView is being initialized:
All the (B4A) code I'm using for initializing my ListViews is identical, and I have poured over it many times to ensure that my code is not the problem (initialized and set up exactly the same way as the ListViews before it which work just fine).
Is there some kind of limit to the number of ListViews that can be initialized for a single activity?
I've just hit a brick wall with this. Help! :sign0085::BangHead:
I am trying to initialize a series of ListViews (16 of them). I am initializing all but one of them invisibly (only the first one is visible/enabled). Depending on what the user does, each of the listviews enable/disable and become visible/invisible to quickly alternate between them (to produce a live menu feel, like navigating a tree).
Example of how I'm initializing the ListViews:
'ListView1
ListView1.Initialize("ListView1")
Activity.AddView(ListView1, 0, 0, 100%x, 100%y)
ListView1.SingleLineLayout.Label.TextSize = 14
ListView1.SingleLineLayout.Label.TextColor = Colors.White
ListView1.SingleLineLayout.Label.Gravity = Gravity.CENTER
ListView1.Visible = True
ListView1.Enabled = True
ListView1.AddSingleLine("Menu Option 1")
ListView1.AddSingleLine("Menu Option 2")
'ListView2
ListView2.Initialize("ListView2")
Activity.AddView(ListView2, 0, 0, 100%x, 100%y)
ListView2.SingleLineLayout.Label.TextSize = 14
ListView2.SingleLineLayout.Label.TextColor = Colors.White
ListView2.SingleLineLayout.Label.Gravity = Gravity.CENTER
ListView2.Visible = False
ListView2.Enabled = False
ListView2.AddSingleLine("Menu Option 1")
ListView2.AddSingleLine("Menu Option 2")
And so on...
However, upon running the app, I get this as the 5th ListView is being initialized:
"java.lang.RuntimeException: Don't call setOnClickListener for an AdapterView. You probably want setOnItemClickListener instead."
All the (B4A) code I'm using for initializing my ListViews is identical, and I have poured over it many times to ensure that my code is not the problem (initialized and set up exactly the same way as the ListViews before it which work just fine).
Is there some kind of limit to the number of ListViews that can be initialized for a single activity?
I've just hit a brick wall with this. Help! :sign0085::BangHead: