这是我在项目中使用的代码:
<android.support.design.widget.TextInputLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/signup_input_full_name_wrapper"
android:layout_marginEnd="@dimen/signup_edit_text_input_fullname_margin_right"
android:layout_marginRight="@dimen/signup_edit_text_input_fullname_margin_right"
android:layout_marginStart="@dimen/signup_edit_text_input_fullname_margin_left"
android:layout_marginLeft="@dimen/signup_edit_text_input_fullname_margin_left"
android:layout_marginTop="@dimen/signup_edit_text_input_fullname_margin_top"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/signup_input_password_wrapper">
<EditText
android:id="@+id/signup_input_full_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="textPersonName"
android:hint="Full Name"
android:textSize="@dimen/signup_edit_text_input_fullname_text_size"
android:textColorHint="@color/signup_edit_text_hint_color"
/>
</android.support.design.widget.TextInputLayout>
这就像它说的那样工作,即它为我提供了嵌套编辑文本的密码切换。我想要的是当编辑文本没有焦点时是否可以隐藏它?