I am familiar with Actionscript programming, and I often used the "<=" (less than or equal to) or ">=" (greater than or equal to) operators.
However in Eclipse, I have been unable to use such operators. Here's my situation. Defined variable:
final EditText UserNumber = (EditText) findViewById(R.id.editText1);
And here's the use:
if (UserNumber <= 10){ }
I'm sure this is a very easy/quick fix but I have been unable to locate what should be used in this situation.
And this is the error I'm getting:
The operator <= is undefined for the argument type(s) EditText, int
As the error clearly states, you can't compare an EditText
instance to a number.
You probably want to get the EditText
's value.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With