我无法理解两者之间是否有任何区别
android:提示
和
android:autofillHints
在EditText
我有以下代码-
android:hint="@string/enter_name"
android:autofillHints="@string/enter_name"
这两行有什么区别?
最佳答案
android:hint
更像是一个占位符,它解释了 EditText
要求的输入类型。即,如果 EditText
要求在社交媒体上发布状态,则像 What's on your mind? 这样的提示将是合适的。
android:autofillHints
是给用户在 EditText
中输入实际值。很像模拟一项任务,让用户思考要放入输入字段中的值。自动填充过程需要更多步骤,因为您还需要考虑很多事情,例如格式化日期。
关于android - android :hint and android:autofillHints in EditText 之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66866887/