Fixed
Status Update
Comments
ae...@google.com <ae...@google.com>
al...@mercari.com <al...@mercari.com> #2
Hi. Thanks for reporting this. Fixed in alpha-04
be...@google.com <be...@google.com>
ap...@google.com <ap...@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
Description
Jetpack Compose component used: androidx.compose.ui.res.painterResource
Android Studio Build:
Android Studio Bumblebee | 2021.1.1 Patch 3
Build #AI-211.7628.21.2111.8309675, built on March 16, 2022
Runtime version: 11.0.11+0-b60-7590822 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 11.6.5
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 16
Registry: external.system.auto.import.disabled=true, ide.instant.shutdown=false
Non-Bundled Plugins: com.dubreuia (2.2.0), com.intellij.javafx (1.0.4), org.jetbrains.kotlin (211-1.6.20-release-275-AS7442.40), com.intellij.lang.jsgraphql (3.1.2), org.intellij.plugins.markdown (211.7142.37),
Kotlin version: 1.6.10
Steps to Reproduce or Code Sample to Reproduce:
1. Display an Image composable using a painterResource, where the drawable resource has both a light and a night version.
2. Add the following to your activity in your AndroidManifest.xml: android:configChanges="colorMode|density|fontScale|keyboard|keyboardHidden|layoutDirection|locale|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode"
3. Rebuild and run the application and view your image from step 1.
4. Toggle the Night/Light Mode setting on the device
5. See that the displayed image is not updated to utilize the night mode version of the resource.
KotlinLang Slack discussion for more context/Info:
Stack trace (if applicable):