Reputation: 78
I have an EditText that accepts a password. The functionality works great, except that a user set the password to 12 characters. For some reason, the EditText only allows 8 and no more.
Below is the EditText XML:
<EditText
android:id="@+id/editTextPasswordValue"
android:inputType="textPassword"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="25dp"
android:minEms="12"
android:singleLine="true"
android:maxLength="12" >
</EditText>
Thanks in advance
Upvotes: 1
Views: 1704
Reputation: 2641
I have just tested your EditText, its working fine. I am able to enter upto 12 characters..
Upvotes: 0
Reputation: 793
Here is an example. I limit the size explicitely with the maxLength attribute, limit it to a single line with maxLines.
<TextView
android:id="@+id/secondLineTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:maxLength="10"/>
Just replace the value for android:maxLength="10"
Upvotes: 1