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();

}

更多相关文章

  1. Android EditText不显示光标的解决方法
  2. Android Studio菜鸟开发————LinearLayout线性布局
  3. EditText不显示光标的解决方法
  4. Android界面布局开发使用的标签介绍
  5. RealtiveLayout(相对布局属性)
  6. 【黑马Android】(02)短信发送器/布局演示/android下单位/android
  7. Android布局优化(四)X2C — 提升布局加载速度200%

随机推荐

  1. android安全问题(五) 抢先拦截短信 - 结果
  2. android生命周期的例子
  3. Android日历只显示年月,只显示年
  4. Android(安卓)从枚举到注解最佳实践
  5. Android用户界面设计
  6. android ndk 入门 - 一个简单的ndk工程
  7. The "Android" command is deprecated.
  8. Android 抽屉式
  9. 2013.09.09——— android 判断存储卡是
  10. 关于Google Map API V2 版本的定位与导航