Android Question CardList B4XView Search & Gap between Panel

Jithesh Mepparambath

Member
Licensed User
Longtime User
HI Erel ,

How I can add a search option to this CustomListView . the requirement is to filter the view according to the search text.

also how i can reduce the gap between each panel items.

sample project attached

regards

Jithesh M
 

Attachments

  • Screenshot_20190327-200833.jpg
    407.5 KB · Views: 480
  • B4A Samples.zip
    413.2 KB · Views: 364

mangojack

Expert
Licensed User
Longtime User
Reducing the gap between panels ... Create a new Card1 Layout Variant (in Designer) with a height to match your desired / declared height in the CreateList sub.
Or change Panel1 vertical anchor to Top only
Then you only have the Divider Height property to deal with.

Regarding a Search option ... One way could be ... At CLV Load time, adding Card Title/Description and clvCard index to a list as an array... then on search you would interate through the list to access the index/s of matching cards and displaying/ scrolling/ offering to user.

You would have to update this list when adding new / removing cards.

also noted in your example ..
B4X:
Dim height As Int = 200dip
If GetDeviceLayoutValues.ApproximateScreenSize < 4.5 Then height = 200dip

the second line is achieving nothing .. and unless you are allowing for smaller screen size , should just be removed.
The original example adds an extra 30dip ?
 
Last edited:
Upvote 0

Jithesh Mepparambath

Member
Licensed User
Longtime User

HI MJ,
thanks for your support. i am now able to achieve the desired result.

how i can add XUI controls to the designer
 
Upvote 0

mangojack

Expert
Licensed User
Longtime User
It is best to start a New Thread for your new question.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…