title: Android: List View Selected item -1
body: <p>Im getting a -1 value when i try to get the selected item position on my listview that is already populated.</p>
  
  <pre><code>list.setOnItemClickListener
  (
     new AdapterView.OnItemClickListener() 
     {
         public void onItemClick(AdapterView adapterView, View view,int arg2, long arg3)
         {
            int selectedPosition = adapterView.getSelectedItemPosition();
            ShowAlert(String.valueOf(selectedPosition));
         }
     }
  );
  </code></pre>
  
  <p>To fill my list view i use the following code:</p>
  
  <pre><code>SimpleAdapter mSchedule = new SimpleAdapter(
            this, 
            mylist, 
            R.layout.listviewtest,
            new String[] {"test1", "test2", "test3"}, 
            new int[] {R.id.TextView_websitename, R.id.TextView_keywords, R.id.TextView_backlink});
  </code></pre>
  
  <p>Any idea?</p>
  
  <p>Thanks in advance.</p>
  
  <p>Best Regards.</p>
  
  <p>Jose.</p>