Don't call setOnClickListener for an AdapterView . You probably want setOnItemClickListener instead http://stackoverflow.com/questions/3402255/setonclicklistener-of-a-listview-not-working Because the Android API is designed that way if it's assigned to an adapterView, it will throw an exception. Clicking on a listView would mean a click on the entire view, which is usually not very useful anyway, since you mostly want to know in your app which exact child view item (list item) has been clicked, not that the entire listview has been clicked.
留言
張貼留言