Android AutoCompleteTextView onItemSelectedListener not triggered with a bluetooth keyboard
<p>I have a simple app that contains just an <code>AutoCompleteTextView</code> (code below). I have the <code>OnItemClickListener</code> and <code>OnItemSelectedListener</code> defined. Clicking on the individual items from the dropdown suggestions triggers the <code>onItemClick</code> event. However, with a bluetooth keyboard, using the arrows keys to navigate to a given item doesn't seem to trigger the <code>onItemSelected</code> event (the logs are not seen for this event).</p>

<p>What triggers this <code>onItemSelected</code> event? I was under the impression that a <code>highlight</code> on one of the dropdown items does it, but that doesn't seem to be the case.</p>

<p>If <code>OnItemSelectedListener</code> is not the correct event listener for the highlighted item, is there any that satisfies this requirement?</p>

<p><strong>activity_main.xml</strong></p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"&gt;

    &lt;AutoCompleteTextView
        android:id="@+id/autoCompleteTextView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" /&gt;
&lt;/RelativeLayout&gt;
</code></pre>

<p><strong>MainActivity.java</strong></p>

<pre><code>public class MainActivity extends Activity {

    String[] options = {"a1", "a2", "a3", "b1", "b2", "b3", "b4", "b5"};

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        // An adapter object
        ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(this, android.R.layout.select_dialog_item, options);

        AutoCompleteTextView autoCompleteTextView = (AutoCompleteTextView)findViewById(R.id.autoCompleteTextView);
        autoCompleteTextView.setAdapter(adapter);
        autoCompleteTextView.setThreshold(1);

        // Set the listeners
        autoCompleteTextView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
                Log.d("OnItemClick", "[AutoCompleteTextView] Item clicked");
            }
        });
        autoCompleteTextView.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
            @Override
            public void onItemSelected(AdapterView&lt;?&gt; parent, View view, int position, long id) {
                Log.d("onItemSelected", "[AutoCompleteTextView] Item selected");
            }

            @Override
            public void onNothingSelected(AdapterView&lt;?&gt; parent) {
                Log.d("onNothingSelected", "[AutoCompleteTextView] Nothing here");
            }
        });

    }
}
</code></pre>