getSelectedItem() return a null pointer

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

getSelectedItem() return a null pointer

Postby dsharp » Thu Sep 04, 2008 2:35 am

When I click a item in the ListView, "l.getSelectedItem()" which is called in the method "onListItemClick(ListView l, View v, int position, long id)" just returns a null pointer. Is that a bug of sdk? While I replace the "l.getSelectedItem()" with "l.getItemAtPosition(position)", then it returns the right pointer.
Oh, the version of my SDK is 0.9 beta
dsharp
Once Poster
Once Poster
 
Posts: 1
Joined: Thu Sep 04, 2008 2:19 am
Location: Sun Yat-Sen University, CN

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: No registered users and 4 guests