0
나는 이상한 버그가있다. 이 http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/을 사용하는 다른 listview를 사용하여 제목과 함께 listview를 만들었습니다. 필자는 제목 목록에 직선 배열을 채웠고 (그다지 많지는 않음) 기존 데이터베이스에서 항목 목록 뷰를 채 웁니다. 두 목록보기가 정상적으로 표시되고 관련 항목을 클릭하여 관련 항목을 확인하지만 목록 의 검색 매개 변수 외부 항목이 있습니다. 사전에목록보기에서 sqlite 데이터베이스의 무작위 항목?
private Cursor getBeginnersCursor()
{
this.cursor = null;
try{
this.getmDB();
if(this.mDB == null)
{
System.out.println("mDB = null");
}
this.cursor = mDB.query(TABLE_NAME,new String[]{KEY_ID,GAME_NAME}, "_id > 11 AND _id < 35",
null,null,null,null);
if(this.cursor != null)
{
this.cursor.moveToNext();
}
mDB.close();
return this.cursor;
}catch(SQLException e){
throw e;
}
}
private List<String> getBeginnersArrayList()
{
this.getmDB();
this.cursor = this.getBeginnersCursor();
String result;
for(this.cursor.moveToFirst(); !this.cursor.isAfterLast();this.cursor.moveToNext())
{
result = this.cursor.getString(1) + "\n";
this.beginnersArrayList.add(result);
}
this.cursor.close();
return beginnersArrayList;
}
많은 감사 :
이 목록을 반환하는 클래스입니다.