내 SQL 데이터베이스 테이블에는 _id, int dayofweek, String 텍스트가 있습니다. 이제 테이블에 SQL 쿼리를 실행하여 결과에 커서를 놓습니다. 다음리스트 뷰에 표시되는 결과안드로이드 : cursor/sql 쿼리
private void showBlocks()
{
Cursor blocks = ttDB.getBlocks();
startManagingCursor(blocks);
int[] key = new int []{
android.R.id.text1,
android.R.id.text2
};
SimpleCursorAdapter blockAdapter = new SimpleCursorAdapter(
this,
android.R.layout.simple_list_item_2,
blocks,
new String[] {
"day",
"text"
},
key);
lv1.setAdapter(blockAdapter);
}
방법 (및) 지금 해당 문자열로 DAYOFWEEK의 정수 값을 대체 할 수 있는가? 나는 쿼리하는 동안 두 개의 테이블을 결합하는 것에 대해 생각했지만 더 이상 다국어가되지는 않습니다.