我已经配置了我的应用程序以支持Android Oreo,其中包含compileSdkVersion 26
。我还为我的电话号码输入字段设置了android:autofillHints="phone"
。当我点击该字段时,我可以看到“自动填充”弹出。然而,当我在“自动填充”挖掘,“内容不能被自动填充”出现面包和我看到的logcat以下跟踪:Android自动填充:dispatchProvideAutofillStructure()未布局
RemoteFillService Not handling { when=-3ms what=3 target=com.android.internal.os.HandlerCaller$MyHandler } as service for ComponentInfo{com.google.android.gms/com.google.android.gms.autofill.service.AutofillService} is already destroyed
View dispatchProvideAutofillStructure(): not laid out, ignoring
我应该如何解决这个问题?我已确认我的电话号码配置为设置>系统>语言&输入>高级>输入帮助>自动填充服务。
使用示例XML更新:在API 26仿真器设置中,我可以选择“使用Google自动填充”。使用Android工作室的设计选项卡,我在XML元素添加一个“手机”类型EditText
,然后手动插入android:autofillHints="phone"
:上述
<EditText
android:id="@+id/editText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="phone"
android:autofillHints="phone" />
logcat的特点可以使用此XML来观察。
请提供相关的java和xml代码 –
除了新增加的'android:autofillHints =“phone”'以外,没有什么特别的XML或代码。我会尽力找出一些时间来阐述。不过,自动填充谷歌似乎目前状态还不成熟:https://plus.google.com/+JuusoOhtonen/posts/4kzMk5LUGLW –
好吧,您还没有提供[mcve]帮助我们提供帮助您。你已经放了250条赏金 - 如果你不再向我们展示更多的东西,你会浪费它 –