title: how to find the position of item in a AutoCompletetextview filled with Array
body: <p>I have an array (<em>array1</em>  with <code>States</code>) and <code>AutoCompleteTextview</code> in which I'm filling it with <em>array1</em>. When I select the value from <code>AutocompleteTextView</code> I select a <code>state</code> from AutoCompleteTextView Dropdown </p>
  
  <p>What I want is to get the <strong>position</strong> of the item from <em>array1</em> which I've selected.<br/>
  What I've tried is <code>OnClickEvent</code> of <code>AutocompelteTextView</code>.</p>
  
  <pre><code>STATE.setOnItemClickListener(new OnItemClickListener(){
  
      @Override
      public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long rowId) {
          String selection = (String) parent.getItemAtPosition(position);
          String num = selection;
      }
  });
  </code></pre>
  
  <p>It ss giving me the value which I selected from dropdown but i want to get the <code>position of the value</code> in <em>array1</em>. For Example I have an array of size 4, like array1 = {A,B,C,D}, and if I select B it should return me B position in Array i.e 2.</p>
  
  <p>I hope I made it clear. Thanks in advance.</p>