Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
checkBox.setBackgroundColor(Color.RED);
将改变整个元素的背景颜色。我只想要广场。这可能吗?
谢谢
您可以尝试android:button="@drawable/bg_checkbox"或checkBox.setButtonDrawable(R.drawable.bg_checkbox);
android:button="@drawable/bg_checkbox"
checkBox.setButtonDrawable(R.drawable.bg_checkbox);