Android Question CardList B4XView Search & Gap between Panel

Discussion in 'Android Questions' started by Jithesh Mepparambath, Mar 27, 2019.

  1. Jithesh Mepparambath

    Jithesh Mepparambath Member Licensed 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
     

    Attached Files:

  2. Erel

    Erel Administrator Staff Member Licensed User

    You should never limit your questions to a single member.
     
  3. Jithesh Mepparambath

    Jithesh Mepparambath Member Licensed User

  4. mangojack

    mangojack Well-Known Member Licensed 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 ..
    Code:
    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: Mar 28, 2019
    Jithesh Mepparambath likes this.
  5. Erel

    Erel Administrator Staff Member Licensed User

    Consider using B4XTable here. It includes built-in search (and more). The list will be page based and not scrollable.
     
    Jithesh Mepparambath likes this.
  6. Jithesh Mepparambath

    Jithesh Mepparambath Member Licensed 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
     
  7. Jithesh Mepparambath

    Jithesh Mepparambath Member Licensed User

    can I use the B4XTable to get the same design as image attached earlier
     
  8. Jithesh Mepparambath

    Jithesh Mepparambath Member Licensed 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
     
  9. Erel

    Erel Administrator Staff Member Licensed User

  10. Jithesh Mepparambath

    Jithesh Mepparambath Member Licensed User

    thnx will check and get back to you later.

    meantime can you help in how to add XUI controls to the designer
     
  11. Jithesh Mepparambath

    Jithesh Mepparambath Member Licensed User

    Hi all,

    how can i add the controls like to my visual designer

    upload_2019-3-28_16-1-2.png

    regards

    Jithesh M
     

    Attached Files:

  12. mangojack

    mangojack Well-Known Member Licensed User

    It is best to start a New Thread for your new question.
     
    Jithesh Mepparambath likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice