Android Question xCustomListView hide rows

AHilberink

Active Member
Licensed User
Longtime User
Hi,

Is it possible to make rows visible/invisible of a xCustomListview?

Kind regards,
André
 

Mahares

Expert
Licensed User
Longtime User
rows visible/invisible of a xCustomListview?

Very simplistic:
B4X:
For i=0 To clv1.Size-1
        If clv1.GetPanel(i).GetView(0).Text.Contains("e") Then  'getview(0) is the first label in the clv item
            clv1.GetPanel(i).Visible=False
        Else
            clv1.GetPanel(i).Visible=True
        End If
    Next
 
Upvote 0

AHilberink

Active Member
Licensed User
Longtime User

Thanks for your reply, Mahares.

Your solution hides the panel, but the row is still there(emtpy visible).
I am looking for a solution to completly invisible the row.

Kind regards,
André
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can remove items and later insert them back.

CLV is an interface element. A good and flexible design is to separate the interface from the data. This means that you should have a regular List (or any other collection) that stores all the items and you should add or remove items from the CLV as needed.
 
Upvote 0

AHilberink

Active Member
Licensed User
Longtime User

Thanks Erel, I am going to change according to your reply.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…