This will be done using TextInputLayout and EditText onFocusChangeListener.
textInputLayoutEmail.setHint("Enter your Email id"); editText.setOnFocusChangeListener(new View.OnFocusChangeListener() { @Override public void onFocusChange(View v, boolean hasFocus) { textInputLayoutEmail.setHint("Email"); } });
Remove tooltip from EditText in an XML file,
<android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:textColorHint="@color/dark_grey" android:textColor="@color/dark_grey" android:background="@drawable/edittext_bg"> <requestFocus /> </EditText> </android.support.design.widget.TextInputLayout>
source share