I want to print something if(txt1="abc") textview value will be same as i given in string. But i always getting error.
Android Studio: (Java) Code are here.... m1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { txt1.setText(txt1.getText().toString()+"a"); m1.setEnabled(false); } }); m2.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { txt1.setText(txt1.getText().toString()+"b"); m2.setEnabled(false); } }); m3.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { txt1.setText(txt1.getText().toString()+"c"); m3.setEnabled(false); } }); m4.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { txt1.setText(txt1.getText().toString()+"d"); m4.setEnabled(false); }