searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String query) {
//
Toast.makeText(MainActivity.this, query, Toast.LENGTH_SHORT).show();
return true;
}
@Override
public boolean onQueryTextChange(String newText) {
//
Toast.makeText(MainActivity.this, newText, Toast.LENGTH_SHORT).show();
return true;
}
});
similar to the above, for example, I want to see which methods are called by the onQueryTextSubmit () method of the SearchView.OnQueryTextListener interface, and is there any way? What is certain is that the system must pass in String query,. So where did this string come from? In the course of learning, the problem I often encounter is that there are many such cases in these classes of the system, that is, how does the process of passing parameters in the system come from? What is the principle? Does the system call these methods and pass parameters or something? Please answer your questions.