Por enquanto ele está branco e eu preciso colocar ele na cor preta, achei varias tutorias, porem não achei um que funcione, como faço isso?
Código:
searchViewPesquisa = (SearchView) findViewById(R.id.searchViewPesquisa);
EditText searchEditText = (EditText) searchViewPesquisa.findViewById(android.support.v7.appcompat.R.id.search_src_text);
searchEditText.setTextColor(getResources().getColor(R.color.textColorThird));
searchEditText.setHintTextColor(getResources().getColor(R.color.textColorThird));
searchViewPesquisa.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
searchViewPesquisa.setIconified(false);
}
});
xml:
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="15dp"
app:cardBackgroundColor="@color/colorBackgroud">
<android.support.v7.widget.SearchView
android:id="@+id/searchViewPesquisa"
style="@style/SearchViewStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</android.support.v7.widget.CardView>
style:
<style name="SearchViewStyle" parent="Widget.AppCompat.SearchView">
<item name="searchHintIcon">@drawable/ic_search_black_24dp</item>
<item name="closeIcon">@drawable/ic_close</item>
<item name="searchIcon">@drawable/ic_search_black_24dp</item>
</style>