我有我的列表視圖的問題,數據是完美的工作,但即時通訊滾動它的標題不斷重複,但當我點擊它的內容工作。 android listview滾動錯誤
這是模擬器中的圖像。
這是我的數據庫
這裏的數據是我在ListView
dataset_cursor = helper.getBooksByTitle2();
startManagingCursor(dataset_cursor);
adapter = new ContentAdapter(dataset_cursor);
list.setAdapter(adapter);`
class ContentAdapter extends CursorAdapter{
ContentAdapter(Cursor c)
{
super(LEGALe.this, c);
}
public void bindView(View row, Context ctxt, Cursor c)
{
ContentHolder holder = (ContentHolder)row.getTag();
holder.populateFrom(c, helper);
}
public View newView (Context ctxt, Cursor c, ViewGroup parent)
{
LayoutInflater inflater = getLayoutInflater();
View row = inflater.inflate(R.layout.row2, parent, false);
ContentHolder holder = new ContentHolder(row);
row.setTag(holder);
return(row);
}
}
public Cursor getBooksByTitle2()
{
return (getReadableDatabase().rawQuery("SELECT _id,table_of_content FROM tblContent WHERE title_id='"+ LEGALe.passedVar.toString() +"' ORDER BY table_of_content" , null));
}
你可以提供一些代碼因爲我沒有得到它:D感謝您的迴應 – Mordiggian
http://www.vogella.com/articles/AndroidListView/article.html#miscellaneous_headerfooter – waqaslam
感謝您的提示:D它真的不正確的回收,最終得到它的工作。 – Mordiggian