title: AutoCompleteTextView Listener not working
body: <p>I have a activity which has a button and 2 autocomplete widget. for the button i am using </p>
  
  <pre><code>addProductButton.setOnClickListener(this);
  </code></pre>
  
  <p>and for the 2 autocomplete widget i am using </p>
  
  <pre><code>supplierTextView.setOnItemClickListener(this);
  </code></pre>
  
  <p>now when i select the first autocomplete it runs this code but does not go into the if loop also when i click a item in the 2nd autocomplete it runs the same code but without going into the else</p>
  
  <pre><code>@Override
  public void onItemClick(AdapterView&lt;?&gt; adapter, View view, int pos, long rowId) {
  // TODO -
  
      String supName = supplierTextView.getText().toString();
  
      String proName = productTextView.getText().toString();
  
      System.out.println("Name selected  "+ view.getId());
  
      if(view == supplierTextView)
      {
          Log.d("Supplier Name selected", supName);
      }
      else if(view == productTextView)
      {
          Log.d("Product Name selected", proName);
      }
  
      loadProducts(supName);
      handleProductSuccess(filteredProduct);
  
  }
  </code></pre>