forum

Home / DeveloperSection / Forums / Status not changing on button press in android

Status not changing on button press in android

Anonymous User 1659 18-Nov-2014

Whenever I presses the button, it should change text, and also change boolean value, yet this is not working. Any help? Thnks

Before onCreate:

public boolean status = false;
Button Click:
case R.id.saveButton:  
if (status != true) {
    currentStatus.setText("Current status: In need of help!");
    status = true;
}
if (status != false) {
    currentStatus.setText("Current status: Fine.");
    status = false;
}
break;


Updated on 19-Nov-2014
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By