關於安卓開發提示:This text field does not specify an inputType or a hint

 <EditText
2         android:layout_width="fill_parent"
3         android:layout_height="wrap_content"
4         android:minLines="3"
5         android:id="@+id/message"
6         />

        這樣寫的時候突然發現有黃色的歎號出現,提示:"This text field does not specify an inputType or a hint";

        原因是這個編輯框缺少一個屬性:hint。


修改後代碼爲:   

複製代碼
1 <EditText
2         android:layout_width="fill_parent"
3         android:layout_height="wrap_content"
4         android:minLines="3"
5         android:hint="@null"
6         android:id="@+id/message"
7         />
解決問題!
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章