How to cancel Edittext enter?

Asked

Viewed 141 times

0

I wish the keyboard didn’t happen when the user touched enter.

How can I do that?

  • 1

    Try changing the XML 'android:singleLine=true' or add the same

  • Hi again Matheus

  • Didn’t solve no...

  • Could you put your xml in the question?

  • 1

    Do you need me to do something specific or jump a line? And if possible put Edittext XML so we can take a look.

1 answer

4

This code should solve your problem: myEditText.setImeOptions(EditorInfo.IME_ACTION_NONE);

  • I’ll test friend worth

  • 1

    plan, if you solve, mark the answer as a solution to the problem to help those who seek the same question.

  • I haven’t had time to do that...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.