final Button btn_LGD = (Button) findViewById(R.id.btn_LGD);
btn_LGD.setOnClickListener(new Button.OnClickListener() {
public void onClick(View v) {
if (flag==true) {
btn_LGD.setBackgroundColor(Color.YELLOW);
TextView textView1 = (TextView) findViewById(R.id.textView1);
textView1.setText("등교 시 교대 선택");
} else {
btn_LGD.setBackgroundColor(Color.LTGRAY);
TextView textView1 = (TextView) findViewById(R.id.textView1);
textView1.setText("지역 선택");
}
}
});
버튼이 한번더 눌리면 false 부분이 실행되어야 되는데
이렇게 했는데 flag=true부분만 실행이되네요!
어디 부분이 잘못된걸까요?ㅠㅠ