请教ListView能否实现监听 我再做一个答题测试的小软件,用的ListView来做答案选项,如何给ListView加载监听实现答题是否正确,并在所有答题结束后的总结页面统计出最后得分,要用run方法能实现吗? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 listview可以设置监听OnItemClickListener,监听每次返回你点击的寻个item项的一系列参数。很简单,很好用,看看API或网上搜一下样码都可以 OnItemClickListener会有一个返回ID序列给你,跟你数据源的序列一样,在这个回调函数里提取ID再根据逻辑做相应的操作即可 protected void onListItemClick(ListView l, View v, int position, long id) { // TODO Auto-generated method stub /*Mp3Info mp3Info=mp3Infos.get(position); System.out.println("mp3Info---->" + mp3Info); Intent intent =new Intent(); intent.putExtra("mp3Info",mp3Info); intent.setClass(this,DownloadService.class); startService(intent);*/ super.onListItemClick(l, v, position, id); } The hierachy of the type (ClassName) is inconsistant. 可不可以修改系统自带的应用 NotificationManager 空指针异常 录音遇到缓冲溢出的问题 如何同时发送短信到多个联系人? android logcat 权限过滤 android的HttpClient使用 android真机调试,怎么获取读取文件权限 关于layout_weight的困惑 android调用wcf,如何进行数据加密??? 关于android全局异常处理的询问询问 page bitmap offscreen
// TODO Auto-generated method stub
/*Mp3Info mp3Info=mp3Infos.get(position);
System.out.println("mp3Info---->" + mp3Info);
Intent intent =new Intent();
intent.putExtra("mp3Info",mp3Info);
intent.setClass(this,DownloadService.class);
startService(intent);*/
super.onListItemClick(l, v, position, id);
}