开发者

Example of ListView in google SDK

开发者 https://www.devze.com 2023-04-13 06:40 出处:网络
I have checked this example on the google SDK and it doesnt work when I click on an item. I h开发者_Python百科ave change the listener to onListItemClick(ListView l, View v, int position, long id) and

I have checked this example on the google SDK and it doesnt work when I click on an item. I h开发者_Python百科ave change the listener to onListItemClick(ListView l, View v, int position, long id) and it works. Someone could tell me why?


In the example, the activity extends ListActivity. In your code, you might be extending Activity and inflating the listview in your layout file.

onListItemClick should be used when you inflate listview in your activity (when not extending ListActivity).


I have change the listener to onListItemClick(ListView l, View v, int position, long id) and works ok.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号