Users Pricing

forum

Home Forums Status not changing on button press in android – MindStick

Status not changing on button press in android

Anonymous User 2057 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;


1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md