Android studio EditText clickable

This question already has an answer here:

  • Stop EditText from gaining focus at Activity startup 46 answers

  • 将android:focusableInTouchMode =“true”设置为您的根布局

        <?xml version="1.0" encoding="utf-8"?>
        <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@color/blue_dark"
            android:focusableInTouchMode="true"
            android:orientation="vertical">
            .
            .
            .
        </RelativeLayout>
    

    只需在你的清单文件中写入

    <activity
            android:name=".YourActivity"
            android:windowSoftInputMode="adjustPan|stateAlwaysHidden" />
    
    链接地址: http://www.djcxy.com/p/24180.html

    上一篇: 获取焦点时,选择EditText中的所有文本

    下一篇: Android工作室EditText可点击