android – 如何更改SearchView textcolor?

前端之家收集整理的这篇文章主要介绍了android – 如何更改SearchView textcolor?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我的SearchView位于布局(LineaLayout / RelativeLayout)不在操作栏中.如何更改文本颜色.默认颜色是白色如何更改文本颜色

解决方法

@H_502_6@SearchView searchView = (SearchView) findViewById(R.id.search); EditText searchEditText = (EditText) searchView.findViewById(android.support.v7.appcompat.R.id.search_src_text); searchEditText.setTextColor(getResources().getColor(R.color.white)); searchEditText.setHintTextColor(getResources().getColor(R.color.white));
原文链接:https://www.f2er.com/android/314563.html

猜你在找的Android相关文章