Concerning the EditText with a single line in XML: adding this XML
code to your EditText should work:

android:singleLine="true"



On 7 apr, 14:54, "Nandan ." <bhavesh2...@gmail.com> wrote:
> yaa you can do this using coding in java
>
> EditText1.setSingleLine(true);
>
> Regards**
>
> Bhavesh kumar
> **
>
>
>
>
>
> On Wed, Apr 7, 2010 at 5:55 PM, Mark Murphy <mmur...@commonsware.com> wrote:
> > > 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?
>
> > Look at android:inputType.
>
> > > 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:
>
> > Your XML did not make it into the email.
>
> > --
> > Mark Murphy (a Commons Guy)
> >http://commonsware.com
> > Android App Developer Books:http://commonsware.com/books.html
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com<android-developers%2Bunsubs 
> > cr...@googlegroups.com>
> > 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.
>
> --
> B!-!/-\\/!=$!-!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to