Android Question How to reuse the space of hidden customlistviews

toby

Well-Known Member
Licensed User
Longtime User

The above screenshots contains 3 sets of label +customlistview. I click a label to show/hide the corresponding customlistview; once a customlistiview is hidden, I want all views below to move up to occupy the empty space.

In the second screenshot, the city customlistview is hidden and its space is left blank. What can I do to move all views up to fill the blank space?

I tried the code below and it didn't work:
B4X:
Private Sub Label1_Click
    CustomListView1.GetBase.Visible=CustomListView1.GetBase.Visible=False
    CustomListView1.GetBase.Height=IIf(CustomListView1.GetBase.Visible, lstClvHeight.Get(0), 0) 'lstClvHeight.Get(0) contains the clv height before being hidden
End Sub
Example project attached.

TIA
 

Attachments

  • hideClv.zip
    15.7 KB · Views: 141

toby

Well-Known Member
Licensed User
Longtime User
I want to group items by category and to be able to show/hide any individual category. When items in a category is hidden, only the category name is shown.

I don't know how to achieve that with a single clv.
 
Last edited:
Upvote 0

ilan

Expert
Licensed User
Longtime User
I want to group items by category and to be able to show/hide any individual category. When items in a category is hidden, only the category name is shown.

I don't know how to achieve that with a single clv.
You can do it easily with a single CLV.
Just hide only the items but leave the category.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…