I want to change the inside color of a switch button to green when it is checked but its only change the background color . Here is my code. Please help me . I want to change the color only through programatically
switchButton.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if (isChecked) {
switchButton.setBackgroundColor(Color.GREEN)
}
}