Android EditText在开始显示时失去焦点

来源:互联网 发布:ubuntu openjdk8 编辑:程序博客网 时间:2024/04/28 05:38
在其父控件下,添加如下的属性:

android:focusable="true"  
android:focusableInTouchMode="true"

    <LinearLayout         android:layout_width="fill_parent"        android:layout_height="wrap_content"        android:orientation="horizontal"        android:focusable="true"         android:focusableInTouchMode="true"
        >                <EditText             android:layout_width="wrap_content"            android:layout_height="wrap_content"            />    </LinearLayout>

0 0
原创粉丝点击