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>

  • 相关阅读:
    书摘--可能与不可能的边界
    电影-茶室
    使用unittest,if __name__ == '__main__':里代码不执行的解决办法
    Pycharm中配置鼠标悬停快速提示方法参数
    Python 解决pip使用超时的问题
    Linux性能监控命令——sar详解
    Linux系统管理
    Linux top命令的用法详细详解
    CentOs7排查CPU高占用
    centos 7 查看磁盘io ,找出占用io读写很高的进程
  • 原文地址:https://www.cnblogs.com/achen0502/p/5466156.html
Copyright © 2011-2022 走看看