0
我想要一個按鈕,在點擊它時創建一個新的文本視圖。我有執行以下功能的onCreate方法:顯示一個新的文本視圖,其中包含一個對sqllite數據庫的請求結果
public void request(View v) {
SQLiteDatabase db = mDbHelper.getReadableDatabase();
String[] projection = {
FeedReaderContract.FeedEntry._ID,
FeedReaderContract.FeedEntry.COLUMN_NAME_TITLE,
};
String sortOrder =
FeedReaderContract.FeedEntry.COLUMN_NAME_TITLE + " DESC";
Cursor cursor = db.query(
FeedReaderContract.FeedEntry.TABLE_NAME, // The table to query
projection, // The columns to return
null, // The columns for the WHERE clause
null, // The values for the WHERE clause
null, // don't group the rows
null, // don't filter by row groups
sortOrder // The sort order
);
}
如何在新的textview上顯示光標的內容? 我需要使用哪種方法以及如何完成上面的代碼?