I want to tell user about the pattern in which they should type location like below
So I have used AutocompleteTextView inside TextInputLayout like code below
<android.support.design.widget.TextInputLayout
android:id="@+id/profile_youraddress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/profile_emailaddress"
android:layout_marginTop="@dimen/margin_10"
android:hint="@string/your_address"
android:textColor="@color/home_primary_color">
<AutoCompleteTextView
android:id="@+id/profile_addresstext"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Malviya Nagar, New Delhi, Delhi"
android:singleLine="true" />
</android.support.design.widget.TextInputLayout>
The problem is that when the TextInputLayout is not in focus it two hints overlap on each other like below
How can I override TextInputLayout's hint on the AutocompleteTextView's hint in non focusable state? Any help will be appreciated.
What I am looking For :
When not in focus, the hint should be "Your Address" ("Malviya Nagar, New Delhi, Delhi" should be hidden) and when in focus hint should be "Malviya Nagar, New Delhi, Delhi".