1 其实android好多细节问题 很简单却很耗费时间 今天遇到 一个
<EditText android:layout_width="fill_parent"
android:layout_height="wrap_content" android:gravity="center"
android:singleLine="false" android:lines="5"
android:layout_marginLeft="10dip" android:layout_marginRight="10dip"
/>
但是 光标不再第一行
其实很简单
android:gravity="top" 这个不仅说说文字布局 还应该加上光标布局。
2.
ContentResolver cr = context.getContentResolver();
String[] projection = new String[] { ContactsContract.Contacts._ID,
ContactsContract.Contacts.DISPLAY_NAME};
Cursor c = cr.query(ContactsContract.Contacts.CONTENT_URI, projection,
ContactsContract.Contacts._ID + " in ("+comma_delimited_ids+") , null,
ContactsContract.Contacts.DISPLAY_NAME + " COLLATE LOCALIZED ASC");
if (c!=null) {
for (c.moveToFirst(); !c.isAfterLast(); c.moveToNext()) {
// your code to get details from cursor
}
c.close();
}