安卓ContentProvider实现查找,分批查找

//用到的方法
Cursor android.content.ContentResolver.query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)

例如一个sql语句

select a from table where id = 3
order by name desc 
limit 10 offset 0

可以用方法这样写

query(uri, new String[]{"a"}, "id = ?", new String[] {"3"}, "name desc limit"+ 10 +"offset"+ 0 );

你可能感兴趣的:(Android笔记)