Assigned
Status Update
Comments
ma...@google.com <ma...@google.com>
jb...@gmail.com <jb...@gmail.com> #2
Hello, can you please attach a sample that reproduces your error?
kl...@gmail.com <kl...@gmail.com> #3
I’ve attached two screen recordings demonstrating the mediator's behavior during the first and second launches after installation. Additionally,
Description
Jetpack Compose component used: androidx.compose.material3:material3:1.0.0-beta01
Kotlin version: 1.7.0
In Shapes.fromToken, all tokens are not mapped with a MaterialTheme.shapes size...
(Extra : The comment about colors is incorrect...)
/**
* Helper function for component shape tokens. Here is an example on how to use component color
* tokens:
* ``MaterialTheme.shapes.fromToken(FabPrimarySmallTokens.ContainerShape)``
*/
internal fun Shapes.fromToken(value: ShapeKeyTokens): Shape {
return when (value) {
ShapeKeyTokens.CornerExtraLarge -> extraLarge
ShapeKeyTokens.CornerExtraLargeTop -> extraLarge.top()
ShapeKeyTokens.CornerExtraSmall -> extraSmall
ShapeKeyTokens.CornerExtraSmallTop -> extraSmall.top()
ShapeKeyTokens.CornerFull -> CircleShape
ShapeKeyTokens.CornerLarge -> large
ShapeKeyTokens.CornerLargeEnd -> large.end()
ShapeKeyTokens.CornerLargeTop -> large.top()
ShapeKeyTokens.CornerMedium -> medium
ShapeKeyTokens.CornerNone -> RectangleShape
ShapeKeyTokens.CornerSmall -> small
}
}
Exemple for Button which use CornerFull token by default.
We can't override Buttons shape at theme level because it don't use any of the theme shapes.
We have to put it on each use...