Fixed
Status Update
Comments
si...@gmail.com <si...@gmail.com> #2
We have some support in androidx.compose.ui.autofill
Leaving this bug open in case Ralston wants to add more info
aa...@yandex-team.ru <aa...@yandex-team.ru> #3
I found an example
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
Is this a bug on your side or do the app developers of these password managers need to change their implementation?
si...@gmail.com <si...@gmail.com> #5
deleted
si...@gmail.com <si...@gmail.com> #6
Facing the same issue here, Google autofill service seems to work. Zero documentation on adding support for Autofill framework on jetpack compose.
ae...@google.com <ae...@google.com> #7
Hello, I am trying to implement the same thing - it seems like there's no way for current password managers like 1Password or Bitwarden, to automatically pick up the fields. Is there a possible solution?
aa...@yandex-team.ru <aa...@yandex-team.ru> #8
I setup this modifier:
@OptIn(ExperimentalComposeUiApi::class)
fun Modifier.autofill(
autofillTypes: List<AutofillType>,
onFill: ((String) -> Unit),
) = composed {
val autofill = LocalAutofill.current
val autofillNode = AutofillNode(onFill = onFill, autofillTypes = autofillTypes)
LocalAutofillTree.current += autofillNode
this.onGloballyPositioned {
autofillNode.boundingBox = it.boundsInWindow()
}.onFocusChanged { focusState ->
autofill?.run {
if (focusState.isFocused) {
requestAutofillForNode(autofillNode)
} else {
cancelAutofillForNode(autofillNode)
}
}
}
}
And use it like this:
val emailState = remember { EmailState() }
Email(
modifier = Modifier.autofill(
autofillTypes = listOf(
AutofillType.Username,
AutofillType.EmailAddress
),
onFill = { emailState.text = it },
),
emailState = emailState,
onImeAction = { onForgotPasswordSubmitted(emailState.text) }
)
With these steps, autofill works for me.
ae...@google.com <ae...@google.com> #10
Works perfectly fine on the latest stable and alpha versions. Did you check in my second comment if you enabled everything?
so...@google.com <so...@google.com>
ap...@google.com <ap...@google.com> #11
I believe so?
I copied the modifier and then used
modifier = Modifier.autofill(
autofillTypes = listOf(
AutofillType.Username,
AutofillType.EmailAddress
),
onFill = { emailState.text = it },
)
on my text field.
mn...@google.com <mn...@google.com> #12
The auto-filling works for me with the latest alpha version, but I'm never presented with the save dialog though.
Description
Jetpack Compose version: 1.3.0-beta01
Adding
Modifier.testTag()
to some element causes it to clip accessibility nodes underneath such element and making these nodes undiscoverable by accessibility service.In the attached video you can see, that when
testTag()
is not applied, everything works as expected - Item#1 isn't clipped, and navigation works correctly - when navigating from Item#16 forward, LazyColumn scrolls down one screen height and Item#17 becomes selected, then when navigating backwards LazyColumn scrolls up and Item#16 becomes selected. But whentestTag()
is applied to "top bar", Item#1 starts to clip, and also navigation breaks - when navigating from Item#16 forward, LazyColumn scrolls and Item#33 becomes selected (because Item#17 becomes clipped), and other way is the same - when navigating from Item#19 backwards, Item#2 becomes selected.