我正在使用下面的 xml 代码:
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/TextLabel">
<android.support.v7.widget.AppCompatEditText
android:id="@+id/edtAddress1Current"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/border_button"
android:hint="My Hint"
android:singleLine="true"
android:textColor="@color/blue"
/>
</android.support.design.widget.TextInputLayout>
场景:
第 1 步:Edittext1 为空白 - Hinttextcolor = 黑色。
第 2 步:Edittext1 值输入 Hinttext = Orange。
第 3 步:从 Edittext1 到 Edittext2 的 Lostfocus,Edittext1 hinttext=Orange。使用 AppcompactEdittext 和 TextInputLayout。
请帮帮我。