在其父控件下,添加如下的属性:
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>