在代码中动态设置了TextView的颜色选择器
holder.bt_buy.setTextColor(mcontext.getResources().getColor(R.color.selector_text_orange_white));
然而这个并没有什么效果,
应该这么写:
holder.bt_buy.setTextColor(mcontext.getResources().getColorStateList(R.color.selector_text_orange_white));当然在布局中还是可以直接使用:
android:textColor="@color/selector_text_theme_white"