MaterialSearchBar
MaterialSearchBar copied to clipboard
detect on submit
Hi,i using this component, firstly thank you for all ,great work how can i detect on submit event when client click the search button on keyboard?
implement listener to your activity/fragment : MaterialSearchBar.OnSearchActionListener
set the listener : searchBar.setOnSearchActionListener(this);
this will be called when user clicks on search button on keyboard.
@Override
public void onSearchConfirmed(CharSequence text) {
Toast.makeText(context,text, Toast.LENGTH_SHORT).show();
}