14
Android TextView: thiết lập màu nền tự động không hoạt động
Thiết lập màu nền lập trình của Android TextViewdường như không hoạt động. Tôi đang thiếu thứ gì đó! TextView et = new TextView(activity); et.setText("350"); et.setBackgroundColor(R.color.white); Tôi cũng có tệp này (colors.xml) trong thư mục res / value của mình <resources> <color name="white">#ffffffff</color> <color name="black">#ff000000</color> </resources> [EDIT]: Ngoài ra, việc …