安卓子控件失去焦点 不弹出软键盘

当子的EditText失去焦点后,父级的LinearLayout获得了焦点,这样在跳转到该fragment时便不会弹出软键盘

 

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/ll_drug_baseinfo_fg"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background_activity_dialog"
android:orientation="vertical"
android:padding="@dimen/dimens_6_160"
android:focusable="true"
android:focusableInTouchMode="true" >

<!-- 药品基本信息 -->

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/dialog_bg_white"
android:orientation="vertical"
android:padding="@dimen/dimens_6_160" >

<!-- 药品名称 -->
<com.hospital.widget.CommonItemValue
android:id="@+id/drug_baseinfo_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:isEditvalue="false"
app:title_textvalue="药品名称" />

<View
style="@style/line_view_stylee_horizontal_fill_gray"
android:layout_marginBottom="@dimen/dimens_3_160"
android:layout_marginTop="@dimen/dimens_3_160" />

<!-- 拼音简码 -->
<com.hospital.widget.CommonItemValue
android:id="@+id/drug_baseinfo_name_code"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:isEditvalue="false"
app:title_textvalue="拼音简码" />

</LinearLayout>

</LinearLayout>

 

转载于:https://www.cnblogs.com/achen0502/p/5466156.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值