Click Event
public void buttonOnClick(View v) {
Button button=(Button) v;
((Button) v).setText("clicked");
Changes BackGround to an image
RelativeLayout rl = (RelativeLayout) findViewById(R.id.BackGround);
rl.setBackgroundResource(R.drawable.mapwork);
Makes Certain Items Disapear
button.setVisibility(View.INVISIBLE);
EditText mText2 = (EditText) findViewById(R.id.input);
mText2.setVisibility(View.INVISIBLE);
Changes what is in the output if they put in a certain number
EditText mText = (EditText) findViewById(R.id.output);
if("8" == mText.getText().toString()){
mText.setText("That does not work!");
}
}
When I test the application the If statement never happens even when the requirements are met. I have tried look for an answer and have not found one. Thank you for helping.