如何从游标类数据游标、数据

由网友(微笑、只是一个弧度而已)分享简介:我需要知道如何从游标检索数据。我需要这个,因为ringtonemanager返回游标对象的形式将所有音频文件,我需要知道如何检索值。I need to know how to retrieve data from cursor. I need this because the ringtonemanager retu...

我需要知道如何从游标检索数据。我需要这个,因为ringtonemanager返回游标对象的形式将所有音频文件,我需要知道如何检索值。

I need to know how to retrieve data from cursor. I need this because the ringtonemanager returns all the audio files in form of cursor object, I need to know how to retrieve the values.

Anbudan。

推荐答案

一旦你的光标对象,你可以做这样的事情:

Once you have the Cursor object, you can do something like this:

if (cursor.moveToFirst()){
   do{
      String data = cursor.getString(cursor.getColumnIndex("data"));
      // do what ever you want here
   }while(cursor.moveToNext());
}
cursor.close();

顺便说一句...你应该考虑接受一些速度。我看你已经获得了巨大的回答大家的一些问题,你为什么不接受其中的一些。如果你不相信这些答案,你可以尝试回答你自己的问题,以防万一你要回馈社会。

By the way... you should consider accepting some rate. I see you have received great answers to some of your questions, why don't you accept some of them. If you are not convinced with those answers, you could try to answer your own question just in case you want to contribute to the community.

再见!

阅读全文

相关推荐

最新文章