EditText的使用

来源:互联网 发布:手机淘宝清缓存的作用 编辑:程序博客网 时间:2024/06/06 03:48
>  EditText
解决Andriod软键盘出现把原来的布局给顶上去的方法(转)-http://blog.csdn.net/xww810319/article/details/17397429
android:windowSoftInputMode="adjustPan|stateHidden"   android:maxLines="1"   android:singleLine="true"
> 禁止进入activity自动弹出键盘,设定activity的属性

android:windowSoftInputMode="stateHidden|stateUnchanged" 


android实用技术--修改键盘回车键显示的方案及执行动作- http://www.jianshu.com/p/7da572d16f07
Android 搜索 把软键盘上的回车键改为搜索- http://blog.csdn.net/lucky_bo/article/details/50771054?ref=myread

Android 密码校验,字符串中必须包含字母或者数字- http://blog.csdn.net/u013347784/article/details/52239026


> 让EditText不能自动获取焦点
<LinearLayout
        android:focusable="true"  
        android:focusableInTouchMode="true"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/gray_light_eeeeee"
        android:orientation="vertical" >

        <EditText
            android:id="@+id/topic_search_input"
            android:layout_width="match_parent"
            android:layout_height="40dip"
            android:layout_marginBottom="10dip"
            android:layout_marginLeft="15dip"
            android:layout_marginRight="15dip"
            android:layout_marginTop="10dip"
            android:background="@drawable/topics_type_bg"
            android:hint="话题名"
            android:padding="10dp"
            android:textSize="16sp" />
</LinearLayout>

原创粉丝点击