Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
クエリを表示する方法があります。
public Cursor getQuery() { String Fav="SELECT score, difficulty, date FROM score LIMIT 15'"; Cursor c=db.rawQuery(Fav,null); return c; }
OnCreate() のテキストビューでこれをどのように使用しますか?
クエリで取得した結果のデータを表示したいと思います。
ここで、データを TextView に表示するには、cursor を反復処理するコードを書き留める必要があります。
例えば:
String strData = ""; if (c!= null) { if (c.moveToFirst()) { do { strData += cursor.getString(Fieldindex)); } while (c.moveToNext()); } } textview.setText(strData);