Fixed
Status Update
Comments
cl...@google.com <cl...@google.com>
an...@google.com <an...@google.com> #2
We have some support in androidx.compose.ui.autofill
Leaving this bug open in case Ralston wants to add more info
mo...@google.com <mo...@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?
af...@gmail.com <af...@gmail.com> #5
deleted
mo...@google.com <mo...@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.
an...@google.com <an...@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?
af...@gmail.com <af...@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
Build: AI-202.7660.26.42.6907010, 202010150442,
AI-202.7660.26.42.6907010, JRE 11.0.8+10-b944.6842174x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.15.7, screens 1680x1050
AS: 4.2 Canary 14; Kotlin plugin: 1.4.20-M1-Studio4.2-1; Android Gradle Plugin: 4.2.0-alpha14; Gradle: 6.7; latest from SDK: 21.3.6528147; CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: 3.18.2
Jetpack Compose: 1.0.0-alpha05
IMPORTANT: Please readhttps://developer.android.com/studio/report-bugs.html carefully and supply all required information.
It seems like when I add a drawShadow modifier with an opacity lower than 1f to a Box. Its and its children's opacity gets affected.
Here's an example where changing the opacity should only change the shadow's opacity but instead it changes the opacity of the whole box.
Please let me know if I can provide any more details. Thanks!