2011年2月18日

让所有Button共享一个监听器

摘要: private void initControls() { add = (Button)this.findViewById(R.id.btn_add); delete = (Button)this.findViewById(R.id.btn_delete); update = (Button)this.findViewById(R.id.btn_update); query = (Button)this.findViewById(R.id.btn_query); add.setOnClickListener(new MyButtonOnClickListener()); delete.setO 阅读全文

posted @ 2011-02-18 14:27 陆晓峰 阅读(677) 评论(0) 推荐(0)

Android 获取 联系人信息

摘要: Cursor cursor = cr.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null); List<String> numbers = null; while (cursor.moveToNext()) { numbers = new ArrayList<String>(); // 获取联系人 int nameFieldColumnIndex = cursor .getColumnIndex(PhoneLookup.DISPLAY_NAME); String name = curso 阅读全文

posted @ 2011-02-18 09:46 陆晓峰 阅读(806) 评论(0) 推荐(0)

导航