如何设置simplecursoradapter在Android的列表视图? [英] how to set the simplecursoradapter to a listview in android?
本文介绍了如何设置simplecursoradapter在Android的列表视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要的simpleCursorAdapter设置成一个ListView。
i have to set the simpleCursorAdapter into a listView.
我怎样才能做到这一点?
how can i achieve that?
感谢。
推荐答案
这问题有点模糊,所以我很想简单地回答:
This question is a bit vague, so I'm tempted to answer simply:
my_list_view.setAdapter(my_cursor_adapter);
但也有文档中更好地解释和例子。这里有一个:
But there are better explanations and examples in the documentation. Here is one:
<一个href="http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/List2.html" rel="nofollow">http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/List2.html
这篇关于如何设置simplecursoradapter在Android的列表视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文