zoukankan      html  css  js  c++  java
  • 安卓子控件失去焦点 不弹出软键盘

    当子的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>

  • 相关阅读:
    谷歌浏览器设置跨域失败
    Validation of viewstate MAC failed 解决办法--zt
    如何查看Oracle客户端版本及位数(Windows系统)(转)
    程序员集锦
    如何最快速地适应新的工作
    Oracle 03113
    Shell中字符串、数值的比较
    K8S客户端安装及使用
    kubectl的使用
    Helm 入门指南
  • 原文地址:https://www.cnblogs.com/achen0502/p/5466156.html
Copyright © 2011-2022 走看看