zoukankan      html  css  js  c++  java
  • Android 设置让EditText不自动获取焦点

    在EditText所在的父控件中设置如下属性:

    android:focusable="true"
    android:focusableInTouchMode="true"

    例如:

    <LinearLayout 
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:focusable="true"
            android:focusableInTouchMode="true">
            
            <com.wzh.view.ClearEditText
                android:layout_marginTop="5dp"
                android:id="@+id/etBqyshwjlw"
                style="@style/cetStyle"
                android:maxLength="12"
                android:hint="本期应税货物及劳务"/>
        
            <com.wzh.view.ClearEditText
                android:layout_marginTop="5dp"
                android:id="@+id/etBqysfw"
                style="@style/cetStyle"
                android:maxLength="12"
                android:hint="本期应税服务"/>
            
            <com.wzh.view.ClearEditText
                android:layout_marginTop="5dp"
                android:id="@+id/etBnyshwjlw"
                style="@style/cetStyle"
                android:maxLength="12"
                android:hint="本年累计应税货物及劳务"/>
            
            <com.wzh.view.ClearEditText
                android:layout_marginTop="5dp"
                android:id="@+id/etBnysfw"
                style="@style/cetStyle"
                android:maxLength="12"
                android:hint="本年累计应税服务"/>
        </LinearLayout>
  • 相关阅读:
    《鱼嘤嘤小分队》第一次作业:项目选题
    第一次博客作业
    csp 201709-2 优先队列模拟
    csp 201403-2
    csp 201809-2 买菜
    JavaScript中伪协议
    修改placeholder的样式
    jQuery对象与DOM对象之间的转换方法
    a的样式
    Guid.NewGuid() 和 new Guid()的区别
  • 原文地址:https://www.cnblogs.com/yshyee/p/3454204.html
Copyright © 2011-2022 走看看