public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
rotation = checked;
if(checked){
switchRotation.setText("h");
switchRotation.setTextColor(Color.WHITE);
}
else{
switchRotation.setText("j");
switchRotation.setTextColor(Color.BLACK);
}
// updateSwitchStatus(); } 这段代码不起作用我怎样才能设置文字颜色?