[英]How to integrate AlertDialog with Navigation component in Jetpack Compose?
[英]How to integrate autofill in Jetpack Compose
我想在我的應用程序(電子郵件和密碼)中提供一些完全使用 Jetpack compose 編寫的自動填充功能。 我遇到了這篇博文和我都嘗試過的演示代碼。 不幸的是,在與文本字段交互時我無法獲得任何彈出窗口。
修改我的代碼后,我最終使用了提供的演示。 一個最小的例子看起來像這樣( ExplicitAutofillTypesDemo
可組合來自上面提到的演示代碼,沒有任何修改):
class MainActivity: AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
ExplicitAutofillTypesDemo()
}
}
}
我錯過了什么? 我需要在其他地方啟用它嗎? 官方撰寫自動填充文檔不是很有幫助。 我只想在觸摸上面博客文章中的文本字段時獲得自動填充彈出窗口。
就我而言,由於自動填充似乎不適用於除 Google 之外的任何其他提供商,因此沒有顯示彈出窗口。 調試日志顯示以下消息:
D/Autofill Status: Autofill popup isn't shown because autofill is not available.
Did you set up autofill?
1. Go to Settings > System > Languages&input > Advanced > Autofill Service
2. Pick a service
Did you add an account?
1. Go to Settings > System > Languages&input > Advanced
2. Click on the settings icon next to the Autofill Service
3. Add your account
我以 Microsoft Authenticator 為例,但它不起作用。 當我切換到 Google 時,一切都按預期進行。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.