Status Update
Comments
mo...@google.com <mo...@google.com>
gr...@google.com <gr...@google.com> #2
We have some support in androidx.compose.ui.autofill
Leaving this bug open in case Ralston wants to add more info
gr...@google.com <gr...@google.com> #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?
gr...@google.com <gr...@google.com> #5
gr...@google.com <gr...@google.com> #6
gr...@google.com <gr...@google.com> #7
ap...@google.com <ap...@google.com> #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.
gr...@google.com <gr...@google.com>
gr...@google.com <gr...@google.com> #10
Works perfectly fine on the latest stable and alpha versions. Did you check in my second comment if you enabled everything?
bu...@google.com <bu...@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.
gr...@google.com <gr...@google.com> #12
si...@gmail.com <si...@gmail.com> #13
The auto-filling works for me with the latest alpha version, but I'm never presented with the save dialog though.
I am having exactly same problem. Autofill works, but the Save dialog is never shown...
gr...@google.com <gr...@google.com> #14
Any updates on this? I can't get LastPass to display at all. I can ONLY get the Google Auto-fill service to work
Description
Jetpack Compose version: 1.7.5
Jetpack Compose component(s) used: foundation
Steps to Reproduce or Code Sample to Reproduce:
TalkBack TreeDebug logs:
Version 1.6.8 (BOM 2024.08.00)
Notice last line - "Important warning" is present
Version 1.7.5 (BOM 2024.10.01)
There "Important warning" is missing
Version 1.8.0-alpha05 (BOM-alpha 2024.10.01)
There "Important warning" is back again
It seems like this regression was added in Icd0becab6818712ab7fa6f3abe83f441a841af5e and fixed in I531e7bad97cda327974696686357a9e56430a6a6 (see TextAnnotatedStringNode.shouldClearDescendantSemantics). Although it is fixed in 1.8-alpha, version 1.7 is broken, preventing our app from updating.