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常用知识笔记
  2. Android(安卓)EditText不显示光标的解决方法
  3. EditText不显示光标的解决方法
  4. 修改光标颜色
  5. EditText属性及使用
  6. android将EditText设置为只可点击 不弹出软键盘不显示光标
  7. EditText光标居上
  8. EditText小总结
  9. 3.EditText

随机推荐

  1. android框架
  2. Android 1.6 支持更多的屏幕大小和分辨率
  3. Android开发需要掌握的10个工具
  4. Eclipse下载Github用Android Studio编辑
  5. 用于 Android 智能手机的 Android Networ
  6. Android(安卓)拍照:如何使用已有相机应用
  7. Android应用程序线程消息循环模型分析(1)
  8. 开机自动运行程序【Android】
  9. 最新的数据显示,十分之四的 Android 用户
  10. Android中布局的巧妙设计【android进化二