android - how to check the text in first two buttons equals to the text in third button -


here code .this doesn't work

button1.gettext() + button2.gettext() == button3.gettext() 

use equals compare strings,

try this,

string button1text = button1.gettext().tostring(); string button2text = button2.gettext().tostring(); string button3text = button3.gettext().tostring();  if((button1text + button2text).equals(button3text)){     // strings equal } else {     // strings not equal } 

Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -