B4A Library [B4X] [XUI] - MiniSearchView AutoComplete field

Discussion in 'Additional libraries, classes and official updates' started by Erel, May 29, 2018.

Thread Status:
Not open for further replies.
  1. Erel

    Erel Administrator Staff Member Licensed User

    A cross platform, compact version of SearchView.

    The custom view is made of a TextField / EditText and a horizontal CLV above it that shows the matching items. The user can click on the items in the list or press enter to autocomplete.




    Usage instructions:

    - Add the module and the MiniSearchView layout file to your project.
    - Add MiniSearchView custom views with the designer.
    - Call MiniSearchView.SetItems to set the items.
    You can change the various colors and the font in the designer.

    Note that the TextField is not immediately ready (it calls Sleep(0) inside DesignerCreateView to allow it to load a layout). This means that if you want to access the internal TextField in Activity_Create then you need to call Sleep(0) and then access it.

    - XUI / iXUI / jXUI - v1.70+
    - xCustomListView v1.63+ (B4J, B4A, B4i)
    - B4A: JavaObject

    The projects are attached. MiniSearchView class is the same in all three projects. MiniSearchView layout file is different.

    Attached Files:

  2. Erel

    Erel Administrator Staff Member Licensed User

    In B4A you will see this warning in debug mode:

    Unexpected event (missing RaiseSynchronousEvents): textfield_textchanged

    You should ignore it.
  3. Tadeu Botelho

    Tadeu Botelho Member Licensed User

    Very good Erel!
    Thanks for the contribution.
  4. Mahares

    Mahares Well Known Member Licensed User

    I tried for hours using Erel's above B4A example to have the list of cities as a vertical list by changing the layouts and changing the orientation in the designer to vertical, but to no avail. Can a long visible vertical list be achieved. If so, how? I like the list to be like this:
    Abu Dhabi
    Addis Ababa
    Thank you
    Last edited: Jun 9, 2018
  5. Erel

    Erel Administrator Staff Member Licensed User

    Use the standard SearchView if you want to show a vertical list.
  6. Erel

    Erel Administrator Staff Member Licensed User

    Please start a new thread if you have any question.
Thread Status:
Not open for further replies.
  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