Fixed
Status Update
Comments
je...@google.com <je...@google.com>
je...@google.com <je...@google.com>
ap...@google.com <ap...@google.com> #2
This one is beginning to be severe, after updating Kotlin to 1.6.0-RC2 the incidents have become more frequent (I hope they aren't related).
The only remedy is still to restart AS.
Still in Chipmunk 2021.2.1.3
ma...@gmail.com <ma...@gmail.com> #3
Hi Roar, thank you for the report. I see a few other similar looking bug reports so I'll prioritize this.
Please let me know if you notice a pattern in which the incidents happen.
Description
Jetpack Compose release version: 1.0.0, Android Studio Build: #AI-203.7717.56.2031.7621141, built on August 8, 2021, Kotlin version: 1.5.10
Steps to reproduce:
Create a TabRow with height in its modifier and the default divider and indicator:
The indicator will draw correctly, but the divider will draw over the entire TabRow, giving the entire row an overlay of 88% transparent LocalContentColor. This is particularly obvious when the TabRow's backgroundColor is not the same as LocalContentColor (e.g. when the TabRow's background is transparent or white).
The issue is that the implementations of the default indicator and divider are inconsistent: the indicator has source code ), but the divider doesn't. The constraints on the TabRow get propagated to the indicator and the divider, so the result is that the indicator draws correctly but the divider obeys the
.wrapContentSize(Alignment.BottomStart)
in its modifier (height
constraint and covers the whole TabRow.Workarounds include setting the TabRow's height by specifying
height
constraints on all of the tabs rather than the parent TabRow, setting the divider to TabRowDefaults.Divider(Modifier.wrapContentSize(Alignment.BottomStart)), or not using a divider (i.e. divider = {}), but if any of these are the intended use of TabRow then it isn't clear from the documentation.