Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request. Autocomplete #5

Open
squarenotch opened this issue Jan 17, 2018 · 1 comment
Open

Feature request. Autocomplete #5

squarenotch opened this issue Jan 17, 2018 · 1 comment

Comments

@squarenotch
Copy link

Just implemented the instant search and it works great thank you!

I have an android app where the search view is shown in every activity and when the user searches they are taken to a search results page. Where the searchbox/hit combination works great for instant searching, when the user is entering a search term on another activity an auto complete / drop down list of matches would be invaluable.

Thanks you for your efforts. Fantastic library.

@PLNech
Copy link
Member

PLNech commented Jan 18, 2018

Hi @squarenotch, thank you for your feedback and kind words!

If I understand correctly, you want to build an autocomplete Activity where you would display results below the searchbar. Would a user clicking on the result be directed to a "main" search Activity, or directly see the result's detailed page?

  • If it is the former, I'm glad to take this feature request and add it to our new features backlog 🙂

  • If it is the latter, I believe you can already do so using a SearchBox followed by a Hits using a minimal hits_item.xml layout:

    <layout>
            <TextView
                android:id="@+id/autocomplete_result"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                algolia:attribute='@{"product_name"}'/>
    </layout>

    With the Hits widget having layout_height="wrap_content", you would have an auto complete UI with a SearchBox and a dropdown that contains the list of matches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants