分享

Android清除EditText自动设置焦点 | 萝卜白菜的小站

 quasiceo 2014-04-12

Android清除EditText自动设置焦点


作者:lenomon   发布:2013-04-06 16:12   分类:Android   阅读:1242   1条评论  











       

       






Android默认情况下EditText会自动获取焦点。可以通过以下方式来关闭:


android:focusable="true"  

android:focusableInTouchMode="true"

<EditText

               android:id="@+id/searchEditText"

              style="@style/WrapContentWidgetStyle"

              android:focusable="true"  

       android:focusableInTouchMode="true"

              android:layout_marginLeft="40dp"

              android:singleLine="true"

            />

其他相关设置可以查看:[Android教程]EditText设置/隐藏光标位置、选中文本和获取/清除焦点

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多