Verified
Status Update
Comments
si...@google.com <si...@google.com> #2
We have some support in androidx.compose.ui.autofill
Leaving this bug open in case Ralston wants to add more info
si...@google.com <si...@google.com>
si...@google.com <si...@google.com>
ha...@google.com <ha...@google.com>
ap...@google.com <ap...@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?
ha...@google.com <ha...@google.com>
ex...@gmail.com <ex...@gmail.com> #5
deleted
ha...@google.com <ha...@google.com> #6
Facing the same issue here, Google autofill service seems to work. Zero documentation on adding support for Autofill framework on jetpack compose.
ex...@gmail.com <ex...@gmail.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?
ex...@gmail.com <ex...@gmail.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.
Description
AS Canary 13, beta04
There are some inconsistencies when
Text
parameters are combined with anAnnotatedString
input. In the example below (see screenshot as well) thefontSize
,textDecoration
,color
, andletterSpacing
parameters ofText
are applied to the whole annotated text, but thefontStyle
andfontFamily
parameters are not. I expected "World" to display as bold, italic and monospace.Note also how
textDecoration = TextDecoration.LineThrough
from the annotated string andTextDecoration.Underline
on theText
combine, which seems reasonable, until you consider attributes likecolor
, which override:color
specified in annotated text overrides the parametercolor
inText
for the annotated portion, as expected (not shown in example).