KEYBOARD DECREASES TO SETAR android:inputType="number""

Asked

Viewed 47 times

0

Putting such a configuration in an Edittext, when compiling the keyboard is "dropped" on the screen

follows the xml of Edittext

   <EditText
            android:id="@+id/edtIP"
            android:layout_width="652dp"
            android:layout_height="wrap_content"
            android:ems="10"
            android:gravity="center"
            android:singleLine="false"
            android:inputType="number"
            android:textSize="20dp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="parent" />

being as follows:

inserir a descrição da imagem aqui

1 answer

1


This is the behavior. When configuring the input type for number android automatically opens the numeric keyboard, or changes from the full keyboard to the numeric, if you do not want this behavior the easiest is to change the input type to text.

android:inputType="text"
  • I would like it to stay numeric but with the normal keyboard behavior!

  • @iDecks this behavior you do not control. It varies from devices. If there is any way to control this, it would be using context, but I believe there isn’t. What you can do is mount your own keyboard...

  • 1

    I will leave the original keyboard and assign a mask to let the user type only numbers, thank you!

  • @iDecks is an interesting option.

Browser other questions tagged

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