题目内容
请根据下面程序片断中注释,在空白划线处填写所需语句。Cursor cursor = null;cursor = (1)______________________// 取得ContentResolver对象//查询表,URI为常量ContactsContract.CommonDataKinds.Phone.CONTENT_URI.(2)__________ (ContactsContract.CommonDataKinds.Phone.CONTENT_URI,(3)________,// 查询结果返回给定表中全部列(4)________,// 查询结果返回给定表中全部行(5)________,// 查询条件语句中无问号(?)参数(6)________);// 查询结果行无排序要求while ((7)____________) {// 将光标移动结果集中下一行String displayName = cursor.(8)____________(// 根据列索引号取得字符串数据// 取得列ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME的索引号cursor.(9)_____________(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));String number = cursor. getString (// 取得列ContactsContract.CommonDataKinds.Phone.NUMBER的索引号cursor. (10)_____________ (ContactsContract.CommonDataKinds.Phone.NUMBER));contactsList.add(displayName + "\n" + number);}
查看答案
搜索结果不匹配?点我反馈
更多问题