How can i make search button functionality for the search button click?

89
November 01, 2019, at 3:50 PM

When i click the search button it will search the particular data from the recyclerview. I tried Searchview Listener it won't be support for the button click search.Please Anyone Can help me to complete this!,Thankyou.

Answer 1

Just add an onclicklistener to the search button.

private OnClickListener searchListener = new OnClickListener() {
    public void onClick(View v) { // do something when the button is clicked 
    } 
}; 
protected void onCreate(Bundle savedValues) {
    // Capture search button from layout      
    Button button = (Button)findViewById(R.id.search_btn); 
    // Register the onClick listener with the implementation above  
    button.setOnClickListener(searchListener);  
}

Take a look at this

Answer 2
searchButton.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        // Put your search functionality here
    }
});
READ ALSO
Import Error: You have an error in your SQL syntax;

Import Error: You have an error in your SQL syntax;

I'm having issues with my jquery codeI'm new to jquery so I'm not really sure where the problem lies

97
Not getting dict back from mysql.connector in flask app

Not getting dict back from mysql.connector in flask app

I am porting a flask app from SQLite to MySQLI have the following in my app

103
Is it possible to use alias as LIKE Search value?

Is it possible to use alias as LIKE Search value?

Is it possible to use a MySQL alias as search string like so?

97
MYSQL: Insert with Select not working properly

MYSQL: Insert with Select not working properly

I can't seem to debug this issueI am currently running to set person_id to -1, but also utilize a select statement with this person_id value

125