I am trying to compare a simple string from the R.string class but something is wrong.
if(this.b1.getText().equals(R.string.stop_track))
The b1 text is equals to stop_track text, why I’m getting a false result?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
R.string.stop_trackis anintidentificator of your string, not it’s value. Try to use this line of code: