There are 4 edittext fields. In two of them I will enter numbers, and in the other two I will display information.
The problem is the following - If you write android:inputType="none" for the field android:inputType="none" , then when you directly click on the field, the keyboard will not appear. However, if you first click on the allowed field (the keyboard appears), and then press "Enter" on the keyboard, it will focus on the field where the android:inputType="none" and open the keyboard.

How can you do that he would skip this field and focus on where allowed?

  • But why use EditText for non-editable fields? What does TextView not suit? - xkor
  • Why do you use EditText as a TextView ? - Vladyslav Matviienko
  • I used EditText to underline the field, otherwise it would look dumb - batman
  • @batman so simply assign to TextView the same style as for EditText then - xkor

1 answer 1

1) Maybe you should consider using TextView?

2) In order to not be able to focus and enter text, use

  <item name="android:focusable">false</item> <item name="android:enabled">false</item> 
  • android:enabled="false" can make the text and / or background gray, better then android:editable="false" - xkor
  • How much better is not known. If a non-editable field looks like the rest of the field, it will confuse the user. He wants to edit the field, but it does not want to edit it. Although there is already the will of the developer. But the non-editable fields should differ from the editable fields visually, my opinion. - Roman Novoselov
  • When you switch to this Activation, there will already be values ​​in the non-editable fields, so the user will not have the desire to edit. - batman
  • @batman afraid of users may be very unexpected) - xkor
  • I'm afraid that what you consider "features" will be perceived by users as a "bug." If the fields are not editable, they need to be somehow separated from the general set of fields. - Roman Novoselov