Android autofill建议使用类似于Google Chrome的新密码
我有一个简单的创建帐户屏幕,如图所示:Android autofill建议使用类似于Google Chrome的新密码,android,passwords,autofill,Android,Passwords,Autofill,我有一个简单的创建帐户屏幕,如图所示: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height=&qu
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:importantForAutofill="yes"
android:orientation="vertical">
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autofillHints="username"
android:hint="email"
android:inputType="textEmailAddress">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autofillHints="password"
android:hint="Create a password"
android:inputType="textPassword">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autofillHints="password"
android:hint="Re-enter password"
android:inputType="textPassword">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</com.google.android.material.textfield.TextInputLayout>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Login" />
</LinearLayout>
当我选择电子邮件字段时,谷歌自动填充服务会建议填写一个电子邮件地址。是否有方法触发密码管理器建议新的安全密码?我在Google Chrome中看到过这种行为,这项功能在原生android应用程序中可用吗?我自己花了很长时间寻找这项功能,显然这是Chrome上的一项自定义功能(来源:) 祝谷歌团队好运