How do I change a button image play
and stop
programmatically?
public void eventOccured(int id) {
Log.i("sat", "Clicked on " + id);
if (id==4){
if (sound_Off){
sound_Off= false;
if (editor != null) {
editor.putBoolean("prefSoundOnOff",false);
editor.commit(); // Very important to save the preference
}
} else {
sound_Off= true;
if (editor != null) {
editor.putBoolean("prefSoundOnOff",true);
editor.commit(); // Very important to save the preference
}
}
}
}
});