title: String and EditText function issues in Android
body: <p>i'm trying to trigger a conditional by checking the user input in an EditText field.  when i print the String from the EditText to logcat, i can see the data change, but the String functions that check against the values always return false.</p>
  
  <pre><code>if(((EditText)findViewById(R.id.drv_in)).getText().toString().equals("")) {
      TX_FAIL_TEXT = "Missing Driver ID!";
  }
  Log.e("SMSDRVERR", ((EditText)findViewById(R.id.drv_in)).getText().toString());
  </code></pre>
  
  <p>this code always displays "Missing Driver ID!".  i have tried these other conditionals, with no success:</p>
  
  <pre><code>(((EditText)findViewById(R.id.drv_in)).getText().toString().isEmpty())  //does not compile, says cannot find symbol, but the function is in the Android documentation
  (((EditText)findViewById(R.id.drv_in)).getText().toString().length() &lt; 1) //returns false, even for strings of length &gt; 1
  </code></pre>
  
  <p>i can confirm that the data is, indeed, no null by looking at logcat and seeing my data show up in the logs.  what's wrong with the conditional?</p>
  
  <p>it doesn't fail if you insert no data in the first transmit. if the first transmit fails, all subsequent transmissions fail, regardless of whether you change the data or not. furthermore, if it passes the first transmission, it will pass all subsequent transmissions.</p>
  
  <p>additionally, there are other conditionals, posted in the full code below, which also evaluate only on the first click of the button.</p>
  
  <pre><code>transmit.setOnClickListener(new View.OnClickListener() {
      public void onClick(View v) {
          //data validation
          ///////////////////////
          boolean valid = true;
          if(((EditText)findViewById(R.id.drv_in)).getText().toString().equals("")) {
              TX_FAIL_TEXT = "Missing Driver ID!";
              showDialog(DIALOG_FAIL);
              TX_FAIL_TEXT = "Transmission Failed!"; //reset the dialog fail text to default
              valid = false;
          }
          Log.e("SMSDRVERR", ((EditText)findViewById(R.id.drv_in)).getText().toString());
          if(custSpn.getSelectedItemPosition() == 0) {
              TX_FAIL_TEXT = "Missing Customer Selection!";
              showDialog(DIALOG_FAIL);
              TX_FAIL_TEXT = "Transmission Failed!"; //reset the dialog fail text to default
              valid = false;
          }
          if(prdSpn.getSelectedItemPosition() == 0) {
              TX_FAIL_TEXT = "Missing Product Selection!";
              showDialog(DIALOG_FAIL);
              TX_FAIL_TEXT = "Transmission Failed!"; //reset the dialog fail text to default
              valid = false;
          }
          if(((Cursor)prdSpn.getItemAtPosition(prdSpn.getSelectedItemPosition())).getString(prdSpn.getSelectedItemPosition()).contains("CAR") || 
                  ((Cursor)prdSpn.getItemAtPosition(prdSpn.getSelectedItemPosition())).getString(prdSpn.getSelectedItemPosition()).contains("AUTO") ||
                  ((Cursor)prdSpn.getItemAtPosition(prdSpn.getSelectedItemPosition())).getString(prdSpn.getSelectedItemPosition()).contains("TRUCK")
              ) {
              //must have make, license# and 1vin
              if(((EditText)findViewById(R.id.make_in)).getText().toString().equals("")) {
                  TX_FAIL_TEXT = "Vehicle Entry:\n Missing Make/Model!";
                  showDialog(DIALOG_FAIL);
                  TX_FAIL_TEXT = "Transmission Failed!"; //reset the dialog fail text to default
                  valid = false;
              }
              if(((EditText)findViewById(R.id.tag_in)).getText().toString().equals("")) {
                  TX_FAIL_TEXT = "Vehicle Entry:\n Missing Tag Number!";
                  showDialog(DIALOG_FAIL);
                  TX_FAIL_TEXT = "Transmission Failed!"; //reset the dialog fail text to default
                  valid = false;
              }
              if(((EditText)findViewById(R.id.vin1_in)).getText().toString().equals("") ||
                      ((EditText)findViewById(R.id.vin2_in)).getText().toString().equals("") ||
                      ((EditText)findViewById(R.id.vin3_in)).getText().toString().equals("") ||
                      ((EditText)findViewById(R.id.vin4_in)).getText().toString().equals("") ||
                      ((EditText)findViewById(R.id.vin5_in)).getText().toString().equals("") ||
                      ((EditText)findViewById(R.id.vin6_in)).getText().toString().equals("") ||
                      ((EditText)findViewById(R.id.vin7_in)).getText().toString().equals("") ||
                      ((EditText)findViewById(R.id.vin8_in)).getText().toString().equals("")
                  ) {
                  TX_FAIL_TEXT = "Vehicle Entry:\n Missing VIN Number!";
                  showDialog(DIALOG_FAIL);
                  TX_FAIL_TEXT = "Transmission Failed!"; //reset the dialog fail text to default
                  valid = false;
              }
          }
          //Log.e("smsDRVERR",((EditText)smsActivity.this.findViewById(R.id.drv_in)).getText().toString());
          //begin transmission
          ///////////////////////
          if(valid) {
              showDialog(DIALOG_TX_PROGRESS);
              Thread t = new Thread(txRunnable);
              t.start();
          } else {
              //do things if needed
  
          }
      }
  </code></pre>