Im developing android app, which use SQLite database.
I have ListView which uses data from Database to show a list (see picture).
The picture is decoded in Base64 String and stored in Database. My problem is this Log:
10-19 16:51:36.612: W/CursorWindow(15151): Window is full:
requested allocation 136877 bytes, free space 78836 bytes, window size 2097152 bytes
It skypes a lot of Frames, because the read time grows.
This is because i read always x+10 rows.
1st, it reads 10 rows, then 20, then 30 and go on...
The solution, what i want to use is, get rows from 0-10, 11 - 20, 21 - 30 and so on. How to achieve this? I just need the Sql query.
EDIT: my query
String columns[] = {KEY_ID, KEY_NAME, KEY_RATING, KEY_CUISINE, KEY_IMAGE};
Cursor cursor = db.query(TABLE_RECIPES, columns, null, null, null, null, KEY_NAME, lim);
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…