请教一下 为什么我的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是属于偷懒型的。以后要该起代码来相当的方便。 如何提取文件? 清除其他应用通知栏信息 stagefright在哪个文件里面? 从一个简单的问题反应出来Android线程机制 The application has stopped unexpectly怎么回事? 如何设置textview,使其有删除线? 共享bug,求解 跪求大神 BaseAdapter 中的 getCount()和getView被疯狂不停的调用 手机连接PC,adb devices无连接,DDMS无连接,这是为什么呢? 求助!!USB HID设备通讯过慢,如何解决 求大神推荐一款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是属于偷懒型的。以后要该起代码来相当的方便。