Setting The Score On Textview
I am trying to set the score in a game but it isn't doing anything at the moment. I have declared a score variable: static int score = 0; When an answer is shown in another t
Solution 1:
check.equals("Correct")
should be
check.getText().equals("Correct")
Solution 2:
You don't heed the check.getText() method call that you have by itself. And you need to use this for your if statement
if(check.getText().toString().equals("correct))
getText returns the object type Editable which is not a String. If you are getting a force close please edit you question to include the stack trace from the LogCat output.
Post a Comment for "Setting The Score On Textview"