Iv'e already set the EditText width and height, I want the user will press next on keyboard and he will move to the next EditText, but when I set android:singleLine="true", the width and height are changing. Here is my code:
<EditText
android:id="@+id/user2"
android:saveEnabled="false"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/imageView1"
android:layout_centerHorizontal="true"
android:layout_marginTop="40dp"
android:background="@color/Alpha_White"
android:ems="10"
android:height="37dp"
android:hint="@string/hint_username"
android:maxLength="22"
android:paddingLeft="7dp"
android:textColorHint="#DDAAAAAA"
android:textSize="17sp"
android:width="230dp"
android:imeOptions="actionNext"
/>
You do not need to have android:layout_width and android:width in the same
View
.android:width
value will be ignored. Use onlyandroid:layout_width
andandroid:layout_height
and put your fixed values there, like this:Use
android:singleLine="true"
to allow yourEditText
to have only one line.