獨立的提示,我想告訴用戶關於其應當低於爲TextInputLayout和AutocompleteTextView
所以我用AutocompleteTextView內TextInputLayout像下面的代碼
<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>
喜歡的類型定位模式
問題是,當TextInputLayout不在焦點時,它有兩個提示相互重疊,如下所示
我該如何重寫TextInputLayout的AutocompleteTextView提示在非可聚焦狀態下的提示?任何幫助將不勝感激。
我在尋找:
當焦點不,提示應該是「你的地址」(「馬爾維亞格爾,新德里,印度」應該被隱藏),當焦點提示應該是「新德里,德里的Malviya Nagar」。
參考http://stackoverflow.com/questions/30537413/textinputlayout-not-showing-edittext-hint-before-user-focus-on-it – sasikumar
我有已經檢查出...這不是問題在這裏....我已經在使用'compile'com.android.support:design:23.4.0''。 –
你在找什麼行爲?也就是說,在你的第二張圖片中,你想讓提示成爲「你的地址」還是「新德里新德里的Malviya Nagar」? –