android - android :hint and android:autofillHints in EditText 之间的区别

标签 android xml android-edittext hint

我无法理解两者之间是否有任何区别

android:提示

android:autofillHints

EditText

我有以下代码-

android:hint="@string/enter_name"
android:autofillHints="@string/enter_name"

这两行有什么区别?

最佳答案

android:hint 更像是一个占位符,它解释了 EditText 要求的输入类型。即,如果 EditText 要求在社交媒体上发布状态,则像 What's on your mind? 这样的提示将是合适的。 enter image description here

android:autofillHints 是给用户在 EditText 中输入实际值。很像模拟一项任务,让用户思考要放入输入字段中的值。自动填充过程需要更多步骤,因为您还需要考虑很多事情,例如格式化日期。 enter image description here

关于android - android :hint and android:autofillHints in EditText 之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66866887/

相关文章:

java - 离线工作 java Hibernate 3.3.2.GA?

android - 检查小数类型的editText是否为空

android.database.sqlite.SQLiteException : near "0": syntax error: ALTER TABLE data ADD COLUMN 0 INTEGER

android - 如何使用复合控件

Android CheckBox 自定义图像无法正确显示

Java SAX : how to use DefaultHandler in the main class

c++ - 如何在不发疯的情况下将 msxml 与 Visual Studio 2008 Express(无 ATL 类)一起使用?

android - 隐藏在键盘后面的EditText

android - 想要在 Activity 进入后台之前清除 EditText 内容

java - ObjectInputStream 给我一个空对象(但读取的文件不为空)