arimorty / floatingsearchview

A search view that implements a floating search bar also known as persistent search
https://github.com/arimorty/floatingsearchview/blob/master/README.md
Apache License 2.0
3.54k stars 668 forks source link

Can't detect search Submit ! #286

Open febinmathew opened 7 years ago

febinmathew commented 7 years ago

I can't find a way to detect if the search is submitted by the user !

anandzoom commented 6 years ago
FloatingSearchView floatingSearchView = findViewById(R.id.floating_search_view);
floatingSearchView.setOnSearchListener(new FloatingSearchView.OnSearchListener() {
    @Override
    public void onSuggestionClicked(SearchSuggestion searchSuggestion) {

    }
    @Override
    public void onSearchAction(String currentQuery) {
        Toast.makeText(YourActivity.this, currentQuery, Toast.LENGTH_SHORT).show();
    }
});

Hope this solves your issue.