请教一下 为什么我的setListAdapter(...)总是出错 而源码的确是这样的 如题 嘿嘿 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我也遇到这个问题:Cursor c = getContentResolver().query(SMS_OUTBOX, null, null, null, null); startManagingCursor(c); String[] columns = new String[] { "body" }; int[] names = new int[] { R.id.textView1 }; adapter = new SimpleCursorAdapter(this, R.layout.main, c, columns,names); //setListAdapter(adapter);注释掉的地方报错! 看看有没有extends ListActivity 你都用数据库了,就别用SimpleCursorAdapter啊 extends CursorAdapter。SimpleAdapter是属于偷懒型的。以后要该起代码来相当的方便。 选择文件的对话框叫什么组件 求Android下蓝牙互联的相关资料 android 自定义menu 怎么修改高度 android文件上传时,界面需有提示,在线 借人气请问怎么实时获取录音时音量的大小? 谁能做个简单的示例给我 DownloadManager 的通知问题 请教关于Service向Activity广播的问题 求怎么实现微信的伪装定位 Android Bootstrap 怎么用?可以在eclipse 中使用吗? 求大神推荐一款wifi热点的软件 mapView怎么监听放大缩小事件
Cursor c = getContentResolver().query(SMS_OUTBOX, null, null, null, null);
startManagingCursor(c);
String[] columns = new String[] { "body" };
int[] names = new int[] { R.id.textView1 };
adapter = new SimpleCursorAdapter(this, R.layout.main, c, columns,names);
//setListAdapter(adapter);注释掉的地方报错!
你都用数据库了,就别用SimpleCursorAdapter啊 extends CursorAdapter。SimpleAdapter是属于偷懒型的。以后要该起代码来相当的方便。