I see that to write in only one line in EditText
must be with android:maxLines="1"
and android:inputType="text"
, but I would like to know if there is any way to do this with android:inputType="number"
, because I only want the keyboard number appears
Example:
<EditText
android:inputType="number"
android:digits="0123456789"
android:maxLines="1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end"/>
But when I do this, when it arrives at the end of the line it goes to another line, keeping the layout size of a line, and without android:maxLines="1"
it increases the layout size of EditText