I am using this below xml code:
<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>
Scenario:
Step 1: Edittext1 is blank- Hinttextcolor = Black.
Step 2: Edittext1 value entered Hinttext = Orange.
Step 3: Lostfocus from Edittext1 to Edittext2, Edittext1 hinttext=Orange. Used AppcompactEdittext and TextInputLayout.
Please help me out.