After a little detective work you'll see that if you look at the source for the SearchView
widget, you will see it extends LinearLayout
with some added functionality. Looking at the line #242
it contains a widget (specifically a SearchAutoComplete
which extends the AutoCompleteTextView
which in the end extends EditText
.
With that said, you'll need to modify the background attribute of that child element, with something on the lines of this:
SearchView c = findViewById(R.id.searchView);
EditText e = (EditText)c.findViewById(c.getContext().getResources().getIdentifier("android:id/search_src_text", null, null));
e.setBackgroundColor(Color.BLACK); //←If you just want a color
e.setBackground(getResources().getDrawable(R.drawable.YOUR_DRAWABLE));
//↑ If you want a drawable ↑