질문 제목이 적절한 지 아닌지 잘 모르겠지만 많이 검색 한 후에이 질문을하고 있습니다. 내 SQLite는 테이블에서CursorAdapter를 사용하는 방법?
, 나는 열이
1: _id 2: position 3: path
position: the position of the gridView where the Image is to set
path: the path of the SDCard having corresponding image
어떻게 어떻게해야합니까에게 경로에서 이미지를 얻을이 후의 GridView
GridView grid = (GridView) findViewById(R.id.play_grid_view);
DBAdapter adapter = new DBAdapter(this); //My costum adapter for databse operation
adapter.open();
Cursor cusor = adapter.getAllImages(); //returns cursor with 3 columns mentioned above
startManagingCursor(cusor);
로 설정합니다 있나요?
'2 : position'을 어떻게 사용 하시겠습니까? 그리드에서 이미지의 위치가 맞습니까? – hendrix
격자가 4 * 4이고 위치가 5를 반환한다고 가정하면 그 이미지는 격자의 2 행 2 열에 표시되어야합니다. –