Status Update
Comments
lp...@google.com <lp...@google.com>
ri...@google.com <ri...@google.com> #2
Branch: androidx-main
commit 9082f62682f853ad5251a1c79dde9eccba7abdd9
Author: Max Alfonso-Ying <maxying@google.com>
Date: Thu Apr 18 00:34:40 2024
[M2 text field] Apply background to decoration box
...instead of to the BasicTextField, so changing the
backgroundColor will properly change the decoration
box's background color.
Fixes:
Test: added unit tests
Relnote: "Fix backgroundColor not applying to
TextFieldDecorationBox and OutlinedTextFieldDecorationBox.
Decoration boxes now accept a `shape` parameter."
Change-Id: I371c26718597cb36ac537e9412ce476532afb40d
M compose/material/material/api/current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/integration-tests/material-demos/src/main/java/androidx/compose/material/demos/TextFieldDecorationBoxDemos.kt
M compose/material/material/src/androidInstrumentedTest/kotlin/androidx/compose/material/textfield/TextFieldDecorationBoxTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/OutlinedTextField.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextField.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextFieldDefaults.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextFieldImpl.kt
lp...@google.com <lp...@google.com> #3
Looks like this is happening because PullRefreshIndicator
uses a Surface
, which internally uses Modifier.pointerInput {}
to block siblings from seeing input. In this particular case it's a problem because we offset the indicator off screen, and the indicator is below the tabs, so it ends up being displayed on top of the tabs and intercepting input.
We should consider:
a) whether we can fully remove the indicator when it's not visible anyway b) not using surface, and hence not blocking input
lp...@google.com <lp...@google.com> #4
I think the best solution here is to replace the Surface
with just a box with modifiers, to avoid blocking input - and keep it always being emitted. That way we won't break cases like using Modifier.onGloballyPositioned, which might not even be emitted until the indicator is shown
ap...@google.com <ap...@google.com> #5
Branch: androidx-main
commit b62278a33435277fd29f4508146eaea171fac45b
Author: Louis Pullen-Freilich <lpf@google.com>
Date: Thu Mar 16 19:00:54 2023
Fixes PullRefreshIndicator intercepting clicks / pointer events
Surface internally blocks input for cases like when you have a drawer / sheet displayed over other content. We don't want that behaviour here, so stop using Surface.
Fixes:
Test: PullRefreshIndicatorTest
Change-Id: I9a1c0251cc4eb933cd41297fb660b6529ec1a0c5
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/pullrefresh/PullRefreshIndicatorTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/pullrefresh/PullRefreshIndicator.kt
na...@google.com <na...@google.com> #6
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material:material:1.5.0-alpha02
ju...@telesoftas.com <ju...@telesoftas.com> #7
Still occurs using material = 1.8.0
.
gd...@blissapplications.com <gd...@blissapplications.com> #8
Using:
androidxCompose = "1.6.0-alpha01"
androidxComposeMaterial3 = "1.2.0-alpha03"
androidx-compose-material = { group = "androidx.compose.material", name = "material", version.ref = "androidxCompose" }
androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3", version.ref = "androidxComposeMaterial3" }
and it works fine
Description
Jetpack Compose version:
androidxCompose = "1.4.0-beta02"
androidxComposeMaterial3 = "1.1.0-alpha07"
accompanist = "0.29.1-alpha"
Jetpack Compose component used:
androidx.compose.material.pullrefresh
androidx.compose.material3.TabRow
Android Studio Build:
Android Studio Electric Eel | 2022.1.1 Patch 2
Kotlin version:
1.8.10
Steps to Reproduce or Code Sample to Reproduce:
Create the following structure:
And you'll notice that the tabs will lose some of their touch area (the middle one). The quick fix is this:
Video in attachment and more information on this thread:https://kotlinlang.slack.com/archives/CJLTWPH7S/p1678101507857829