[android-beginners] Re: how to i check if an EditText is empty

2009-10-21 Thread Roman ( T-Mobile USA)
You cannot check the emptiness of a String using the "=" operator! You would need to use the equals method which is a method in the String class String yourString = someEditText.getText().toString(); if (yourString.equals("") ){ } -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stic

[android-beginners] Re: how to i check if an EditText is empty

2009-10-20 Thread James Yum
FYI, Android has a handy TextUtils library: http://developer.android.com/reference/android/text/TextUtils.html#isEmpty(java.lang.CharSequence) Cheers, James On Tue, Oct 20, 2009 at 2:18 PM, Jeffr

[android-beginners] Re: how to i check if an EditText is empty

2009-10-20 Thread Jeffrey Blattman
toString().length() == 0? On Oct 20, 2009 1:48 PM, "JasonMP" wrote: using "if(someEditText.getText().toString == null) " doesnt work im passing information from this editText into a database. Ive already limited it to 2 characters and numbers only in the xml file, but i need to run a check to