title: How do I make the autocomplete prediction clickable?
body: <p>When I enter something, I get an autocomplete prediction. Like when I enter "Joh", I get "John F. Kennedy". Now, if the user clicks on "John F. Kennedy", it takes him into an activity that gives him info about John F. Kennedy. What should I do to get this ? How do I make the autocomplete prediction clickable ?</p>
  
  <pre><code>package com.mavenmaverick.autocomplete_test;
  
  import android.os.Bundle;
  import android.app.Activity;
  import android.view.Menu;
  import android.widget.ArrayAdapter;
  import android.widget.AutoCompleteTextView;
  
  
  public class MainActivity extends Activity {
  
  String[] presidents= { "John F. Kennedy",
                      "Lyndon B. Johnson",
                      "Richard Nixon",
                      "Gerald Ford",
                      "Jimmy Carter",
                      "Ronald Reagan",
                      "George H. W. Bush",
                      "Bill Clinton",
                      "George W. Bush",
                      "Barack Obama"
                      };
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      AutoCompleteTextView textView = (AutoCompleteTextView) findViewById(R.id.autoCompleteTextView1);
      ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(this, android.R.layout.select_dialog_item, presidents);
  
      textView.setThreshold(3);
      textView.setAdapter(adapter);
  
  }
  
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/ivM02.png" alt="Autocomplete_Test"></p>