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 667 forks source link

HomeActionClickListener issue #332

Open dillibabukadati opened 5 years ago

dillibabukadati commented 5 years ago

For home action clickListener method never gets called.

searchInputView.setOnHomeActionClickListener(new FloatingSearchView.OnHomeActionClickListener() {
            @Override
            public void onHomeClicked() {
           Log.d(TAG,"Home action clicked");

            }
        });
vishalknishad commented 4 years ago

I faced same issue but found a workaround for it:

View leftActionIcon = mSearchView.findViewById(com.arlib.floatingsearchview.R.id.left_action);
leftActionIcon.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        // do something
        mSearchView.clearSearchFocus();
    }
});