Status Update
Comments
lp...@google.com <lp...@google.com>
ri...@google.com <ri...@google.com> #2
Branch: androidx-master-dev
commit 23a7d960caf43390a554700d3c56ada189a9d10e
Author: Louis Pullen-Freilich <lpf@google.com>
Date: Mon Aug 10 15:11:36 2020
IconButton / IconToggleButton API scrub
Test: ./gradlew updateApi
Bug:
Bug:
Relnote: "Adds enabled parameter to IconButton, and reorders parameters in IconToggleButton"
Change-Id: I0a9419b1a631cadad451395302ad87b7f9214f96
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/IconButton.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