title: What is the default value of android:text of EditText while the android:text is left undefined?
body: <p>I'm a beginner in Android development. In my project, I created a TableLayout --I reckon that a GridLayout can do more help, but since I'm not familiar with GridLayout TableLayout was taken -- with some EditTexts to get values from user. The activity actually is a submit-able form. To left of each EditText, there is a TextView defining what is expected from the corresponding EditText, so I don't have to and didn't set a default text for EditText (which usually is used as a hint). There is also a button in this activity for submitting this form. I picked some EditTexts as MUST_FILLED ones, so in the button's custom listener class, I have to check if these MUST_FILLEDs have been filled. follow the intuition I coded as follow:</p>
  
  <pre><code>String s4 = machine_id.getText().toString().trim();
  if(s4 == null || s4 == ""){
      Toast.makeText(v.getContext(), 
              "Please Input the machine ID", Toast.LENGTH_SHORT).show();
  }
  </code></pre>
  
  <p>machine_id here is <code>android:id</code> for an EditText. This code ends up with no toast displayed. So I think there is a default text value for EditText even though <code>android:text</code> is not defined manually. Then I wrote a simple project to confirm my thought. Here is the MainActivity.java</p>
  
  <pre><code>public class EditText_testActivity extends Activity implements View.OnClickListener{
  /** Called when the activity is first created. */
  private String text;
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          EditText et = (EditText)findViewById(R.id.et01);
          text = et.getText().toString();
  
          Button btn = (Button)findViewById(R.id.btn01);
          btn.setOnClickListener(this);
      }
  
  @Override
  public void onClick(View v) {
      if(text != null)
          Toast.makeText(v.getContext(), text, Toast.LENGTH_SHORT).show();
      else
          Toast.makeText(v.getContext(), "null", Toast.LENGTH_SHORT).show();
  
  }
  }
  </code></pre>
  
  <p>And main.xml:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical" &gt;
  
      &lt;EditText
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:id="@+id/et01" /&gt;
      &lt;Button 
          android:layout_width="wrap_content" 
          android:layout_height="wrap_content"
          android:id="@+id/btn01"
          android:text="TouchMe"/&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>It does proved EditText has a default text value, because <code>Toast.makeText(v.getContext(), text, Toast.LENGTH_SHORT).show();</code> does show a toast. However, it shows something that looks like a blank space but not exactly is. </p>
  
  <p>Finally, I'm wondering what is the default value of android:text in EditText. </p>
  
  <p>Thanks in advance. </p>