您的位置:首页 > 其它

EditText 不自动获取焦点

2017-03-24 21:10 113 查看
 页面加载出来之后就弹出软键盘是不是感觉有点不爽。。。。解决办法 在EditText的父布局的LinerLayout加上红色的两句代码就好了

<LinearLayout
android:focusable="true"
android:focusableInTouchMode="true"
android:layout_marginTop="144px"
android:layout_width="match_parent"
android:layout_height="118px">

<EditText
android:hint="搜索。。。。。"
android:background="@drawable/edit_bg_style"
android:textColorHint="#ccc"
android:singleLine="true"
android:textCursorDrawable="@null"
android:layout_marginRight="52px"
android:layout_marginLeft="52px"
android:layout_width="match_parent"
android:layout_height="match_parent" />

</LinearLayout>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: