SearchView is not the text that you enter into the text of the EditText, but rather the LinearLayout, which contains a bunch of views, including the text of the edit.
To get an idea that you really want to turn off, follow these steps:
EditText searchViewEditText = (EditText) searchView.findViewById(R.id.search_src_text);
Please note: this only works if you use v7 search support, as the specific resource identifier is internal if you use the view-based view.
source share