I'm using a textbox to have the user input a search criteria. The app then searches a file and populates the listview with all the items it found matching that criteria. For some reason any item that is more than two lines displays the black bars shown in the screenshot.
The color of those black bars is determined by listview.sv.color, but I can't simply change its value since it determines the divider.
This is not xCustomListView as I'm using an older version of B4A (7.01) and when I tried to use it if I recall correctly it required some features not present in this version.
How can I fix this? I've been completely unable to replicate this behaviour in a smaller project, no matter how similar I make the conditions. It also seems to happen randomly sometimes with some listviews I have separated using TabStripViewPager, within the same app.
This is not xCustomListView as I'm using an older version of B4A (7.01) and when I tried to use it if I recall correctly it required some features not present in this version.
If you modified CustomListView and changed the way it creates the items then make sure that you are not using the same ColorDrawable or a similar drawable multiple times.
I'm trying to switch, but it throws the following warning: Cannot access view's dimension before it is added to its parent.
If I edit those lines it keeps crashing in different points throwing errors about nullpointerexceptions. The same happens with the example linked in the post about xcustomlistview.
I'm trying to switch, but it throws the following warning: Cannot access view's dimension before it is added to its parent.
If I edit those lines it keeps crashing in different points throwing errors about nullpointerexceptions. The same happens with the example linked in the post about xcustomlistview.
We don't know how you are using CLV (probably not in the right way ) and we don't know "those lines". However, in some cases, you could/should call routines using CallSubDelayed from Activity_Create, so that the UI is completely created.
We don't know how you are using CLV (probably not in the right way ) and we don't know "those lines". However, in some cases, you could/should call routines using CallSubDelayed from Activity_Create, so that the UI is completely created.
As I wrote above the example downloaded from the xcustomlistview post also crashes as well, which makes me think it's something to do with my version of B4A rather than how I'm using CLV.
The lines that error out are line 58,445 and 446 within the customlistview.bas file. I'm using the file as is, without editing anything. I've attached a couple screenshots.
As I wrote above the example downloaded from the xcustomlistview post also crashes as well, which makes me think it's something to do with my version of B4A rather than how I'm using CLV.
In older versions of B4A, it was not possible to set the size of a view without adding it to a parent. This is now possible and is very useful. This is the cause of the error.