我试图使 endIconDrawable 不可见或不可见,它是上图中仅用于名字字段的编辑图标,并且希望保留其余字段的可见编辑图标,但无法做到这一点?我怎样才能做到这一点?
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tilFirstName"
android:layout_width="match_parent"
android:layout_height="@dimen/_64dp"
app:endIconDrawable="@drawable/icon_edit"
app:endIconMode="custom">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etFirstName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusableInTouchMode="false"
android:hint="@string/label_fname"
android:inputType="textCapWords" />
</com.google.android.material.textfield.TextInputLayout>
Run Code Online (Sandbox Code Playgroud)
我想得到如下图所示的内容:
android android-drawable android-textinputlayout material-components-android