Hello,

I have a login view on an application with an EditText for entering a username.  I can't seem to restrict the EditText to be a single line.  I don't want the user to be able to press "return" on the soft keyboard and get a second line.  I tried setting maxLines to 1, but that appears to control only the number of lines visible. Is there a way to limit the EditText to a single line?

I am also wondering if there is a way to set the soft keyboard's "return" key to a "done" key.  I am basically trying to have the user touch the username EditText, enter a username, press "done", and do the same with the password field.  Here is the snippet of layout xml that has not been working for me:

<EditText
android:id="@+id/usernameVal"
android:layout_width="120px"
android:layout_height="wrap_content"
android:textSize="18sp"
android:layout_x="90px"
android:layout_y="175px"
android:maxLines="1">
</EditText>


Any guidance would be appreciated!

Thank you very much!

Dan

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
 
To unsubscribe, reply using "remove me" as the subject.

Reply via email to