直接在父布局上面设置以下参数: android:focusable=“true” android:clickable=“true” android:focusableInTouchMode=“true” 代码中都有直接对应的set函数直接设置,当点击父布局时Edittext的焦点就消失了。
300字范文,内容丰富有趣,生活中的好帮手!
时间:2024-07-30 12:17:09
直接在父布局上面设置以下参数: android:focusable=“true” android:clickable=“true” android:focusableInTouchMode=“true” 代码中都有直接对应的set函数直接设置,当点击父布局时Edittext的焦点就消失了。