這似乎是我遇到過的最奇怪的事情。android EditText提示不會出現
這裏是一個佈局:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<EditText
android:id="@+id/GuessAppEditText"
android:lines="1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:gravity="center_horizontal"
android:inputType="textCapWords"
android:hint="@string/Hint" />
</RelativeLayout>
的的EditText
hint
未示出。
如果我刪除android:gravity="center_horizontal"
或android:inputType="textCapWords"
,則提示變爲可見。
我完全不知道gravity
和textCapWords
與hint
有什麼關係。它是另一個Android錯誤還是我做錯了什麼?在前一種情況下,什麼是解決方法?我希望我的文本能夠中心對齊並大寫,並提示顯示。或者我想要從糟糕的Android中獲得太多東西?
請參閱相關的問題http://stackoverflow.com/a/3643494/1134705 – jnthnjns
您是否嘗試刪除該提示並以編程方式進行設置,以查看這是否是一種解決方法? – jnthnjns
android:gravity =「center_horizontal」創建問題... –