Answer the question
In order to leave comments, you need to log in
How to check for pressing the "." on the numeric keypad NumberDecimal?
I did the check as follows.
Edittext myedittext = (EditText) findViewById(R.id.edittext1);
if(myedittext.gettext().toString()==".")
{
// Действия
}
Answer the question
In order to leave comments, you need to log in
In Java, string values are not checked for "==" (unlike C#, for example)
. You need to call the .equals() method.
if(myedittext.getText().toString().equals(".")) {
// Действия
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question