【发布时间】:2015-05-21 11:09:30
【问题描述】:
我正在使用 Fragment 类,当我在编辑文本上更改文本时,我想在其中更改文本视图的颜色。在 EditText 中更改文本时更改 TextView 的背景颜色的可能方法是什么。我的代码如下所示:
public class Fragment_AboutUs extends android.app.Fragment {
TextView about_btn_call_customer;
TextView about_btn_Submit;
EditText about_feedback;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.layout_fragment_about_us, container, false);
//reference section
about_btn_call_customer= (TextView) rootView.findViewById(R.id.about_btn_call_customer);
about_btn_Submit=(TextView)rootView.findViewById(R.id.about_btn_Submit);
about_feedback=(EditText)rootView.findViewById(R.id.about_feedback);
return rootView;
}
}
我们将不胜感激。
【问题讨论】:
标签: android colors background android-edittext textview