I want to restrict the edittext entry to a single line but When I add the line android:singleline = "true"
, the hint is disappears, and after entering 26 characters the cursor is coming down.
Here's my XML code:
<EditText
android:background="@drawable/edittxtborder"
android:id="@+id/reglastname"
android:singleLine="true"
android:gravity="center"
android:hint="@string/reglname"
android:textSize="12dp"
/>