title: android 101 - listview inheritance question
body: <p>I have a ListView in my extended ListActivity class.</p>
  
  <p>And then I have the following code to detect my click on the list</p>
  
  <pre><code>protected void onListItemClick(ListView l, View v, int position, long id)
  {
     Log.i("", ""+l.getSelectedItem().toString());
  }
  </code></pre>
  
  <p>I want to get the data string associated to my click. </p>
  
  <ol>
  <li><p>When I run the code, I get an error with getSelectedItem(). </p></li>
  </ol>
  
  <p><a href="http://developer.android.com/reference/android/widget/ListView.html" rel="nofollow noreferrer">http://developer.android.com/reference/android/widget/ListView.html</a>. 
  getSelectedItem() is not method of ListView but it is defined in the superclass AdapterView.
  How is that possible? Rolling Eyes</p>
  
  <p>2.
   Also , I'm not sure I understand this line:
  android.widget.AdapterView
  when it also inherits from   android.view.ViewGroup
  isn't that multiple inheritance?</p>