title: How to check AutoCompleteTextView if it contains text?
body: <p>I have two AutoCompleteTextView in fragments that user should fill. Then these two string values must be sent to other activity otherwise (if it doesn't filled) you should see a toast. I tried to implement it but it doesn't work:</p>
  
  <pre><code>public void onFindPathClick(View view) {
      String originAddress = OriginPlaceFragment.mAutoPlaceSearch.getText().toString();
      String destinationAddress = DestinationPlaceFragment.mAutoPlaceSearch.getText().toString();
  
      Intent intent = new Intent(SimpleTabsActivity.this, MapsActivity.class);
      if ((originAddress != "") &amp;&amp; (!originAddress.equals(null)) &amp;&amp; (destinationAddress != "") &amp;&amp; (!destinationAddress.equals(null))) {
          intent.putExtra(ORIGIN_ADDRESS, originAddress);
          intent.putExtra(DESTIN_ADDRESS, destinationAddress);
          startActivity(intent);
      } else {
          Toast.makeText(this, "Fill \"from\" and \"to\" fields", Toast.LENGTH_SHORT).show();
      }
  }
  </code></pre>