刚看个帖子,很受用,做个笔记。
为了避免全局遍历不必要的开销,Android查询字段,也像SQL一样支持通配的,它本身也就是Sqlite。—_—||
Cursor c = getContentResolver().query(personUri,
null, columnName+" like /'%"+content+"%/'", null, null);//查询所有包含content的名字
注:这里用于查询联系人
刚看个帖子,很受用,做个笔记。
为了避免全局遍历不必要的开销,Android查询字段,也像SQL一样支持通配的,它本身也就是Sqlite。—_—||
Cursor c = getContentResolver().query(personUri,
null, columnName+" like /'%"+content+"%/'", null, null);//查询所有包含content的名字
注:这里用于查询联系人