I want to disable button permanently after click on it. I am trying several time, but when I close the app or go back to the previous layout it remain enable.
btn1.setOnClickListener(new View.OnClickListener() {
public void onClick (View v) {
Integer t = count * 650;
String tot = t.toString();
selectseat.setText(selectseat.getText().toString() + " A1 ");
fair.setText("Fair: " + tot);
btn1.setBackgroundColor(Color.GREEN);
btn1.setEnabled(false);
/* if(flag == 1)
{
btn1.setBackgroundColor(Color.GREEN);
btn1.setEnabled(false);
Log.d("ins", "called");
}
flag = 0;*/
count++;