Fixed
Status Update
Comments
cl...@google.com <cl...@google.com>
an...@google.com <an...@google.com> #2
Hi. Thanks for reporting this. Fixed in alpha-04
mo...@google.com <mo...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug: b/264018028
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
https://android-review.googlesource.com/2373449
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug:
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
an...@google.com <an...@google.com> #4
deleted
af...@gmail.com <af...@gmail.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.tv:tv-material:1.0.0-alpha04
mo...@google.com <mo...@google.com> #6
Hmm.. maybe removing opacity
is a good idea. A developer can always write her own version.
an...@google.com <an...@google.com> #7
A bit hacky, but you can achieve it by stacking the shadow with opacity with your real content on top of it.
Box(Modifier.size(48.dp)) {
Box(Modifier.fillMaxSize().drawShadow(elevation = 4.dp, opacity = 0.5f))
Box(Modifier.fillMaxSize()) {
/// your content
}
}
Box(Modifier.size(48.dp)) {
Box(Modifier.fillMaxSize().drawShadow(elevation = 4.dp, opacity = 0.5f))
Box(Modifier.fillMaxSize()) {
/// your content
}
}
af...@gmail.com <af...@gmail.com> #8
Thanks. That's how I implemented moving a shadow behind a box too, so I guess that works!
ap...@google.com <ap...@google.com> #9
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 0b4461f9627049831e2fd92a593a757aeca6ee84
Author: George Mount <mount@google.com>
Date: Tue Oct 27 11:14:34 2020
Remove opacity from drawShadow
Fixes: 171624638
Relnote: "Removed opacity from drawShadow() modifier as it was
confusing."
Test: existing tests
Change-Id: I82c622c9eb42c528667fdaeef53271c502c16fb5
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/public_plus_experimental_current.txt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/draw/DrawShadowTest.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/draw/DrawShadow.kt
https://android-review.googlesource.com/1477077
Branch: androidx-master-dev
commit 0b4461f9627049831e2fd92a593a757aeca6ee84
Author: George Mount <mount@google.com>
Date: Tue Oct 27 11:14:34 2020
Remove opacity from drawShadow
Fixes: 171624638
Relnote: "Removed opacity from drawShadow() modifier as it was
confusing."
Test: existing tests
Change-Id: I82c622c9eb42c528667fdaeef53271c502c16fb5
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/public_plus_experimental_current.txt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/draw/DrawShadowTest.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/draw/DrawShadow.kt
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!