@@ -327,22 +327,22 @@ bottom app bars and FABs and affects other components:
327
327
``` xml
328
328
<style name =" Theme.App" parent =" Theme.Material3.*" >
329
329
...
330
- <item name =" colorPrimary " >@color/shrine_pink_100</item >
331
- <item name =" colorOnPrimary " >@color/shrine_pink_900</item >
332
- <item name =" colorSecondary " >@color/shrine_pink_50</item >
333
- <item name =" colorOnSecondary " >@color/shrine_pink_900</item >
330
+ <item name =" colorSurfaceContainer " >@color/shrine_pink_100</item >
331
+ <item name =" colorOnSurface " >@color/shrine_pink_900</item >
332
+ <item name =" colorPrimaryContainer " >@color/shrine_pink_50</item >
333
+ <item name =" colorOnPrimaryContainer " >@color/shrine_pink_900</item >
334
334
<item name =" textAppearanceTitleMedium" >@style/TextAppearance.App.Medium</item >
335
- <item name =" shapeAppearanceSmallComponent " >@style/ShapeAppearance.App.SmallComponent </item >
335
+ <item name =" shapeAppearanceCornerLarge " >@style/ShapeAppearance.App.Corner.Large </item >
336
336
</style >
337
337
338
338
<style name =" TextAppearance.App.Medium" parent =" TextAppearance.Material3.TitleMedium" >
339
339
<item name =" fontFamily" >@font/rubik</item >
340
340
<item name =" android:fontFamily" >@font/rubik</item >
341
341
</style >
342
342
343
- <style name =" ShapeAppearance.App.SmallComponent " parent =" ShapeAppearance.Material3.SmallComponent " >
343
+ <style name =" ShapeAppearance.App.Corner.Large " parent =" ShapeAppearance.Material3.Corner.Large " >
344
344
<item name =" cornerFamily" >cut</item >
345
- <item name =" cornerSize" >4dp </item >
345
+ <item name =" cornerSize" >50% </item >
346
346
</style >
347
347
```
348
348
@@ -360,20 +360,20 @@ theme to all bottom app bars and FABs but does not affect other components:
360
360
<item name =" materialThemeOverlay" >@style/ThemeOverlay.App.BottomAppBar</item >
361
361
</style >
362
362
363
- <style name =" Widget.App.FloatingActionButton" parent =" Widget.Material3.FloatingActionButton" >
363
+ <style name =" Widget.App.FloatingActionButton" parent =" Widget.Material3.FloatingActionButton.Primary " >
364
364
<item name =" materialThemeOverlay" >@style/ThemeOverlay.App.FloatingActionButton</item >
365
365
</style >
366
366
367
- <style name =" ThemeOverlay.App.BottomAppBar" parent =" " >
368
- <item name =" colorPrimary " >@color/shrine_pink_100</item >
369
- <item name =" colorOnPrimary " >@color/shrine_pink_900</item >
367
+ <style name =" ThemeOverlay.App.BottomAppBar" parent =" ThemeOverlay.Material3.BottomAppBar " >
368
+ <item name =" colorSurfaceContainer " >@color/shrine_pink_100</item >
369
+ <item name =" colorOnSurface " >@color/shrine_pink_900</item >
370
370
<item name =" textAppearanceTitleMedium" >@style/TextAppearance.App.TitleMedium</item >
371
371
</style >
372
372
373
- <style name =" ThemeOverlay.App.FloatingActionButton" parent =" " >
374
- <item name =" colorSecondary " >@color/shrine_pink_50</item >
375
- <item name =" colorOnSecondary " >@color/shrine_pink_900</item >
376
- <item name =" shapeAppearanceSmallComponent " >@style/ShapeAppearance.App.SmallComponent </item >
373
+ <style name =" ThemeOverlay.App.FloatingActionButton" parent =" ThemeOverlay.Material3.FloatingActionButton.Primary " >
374
+ <item name =" colorPrimaryContainer " >@color/shrine_pink_50</item >
375
+ <item name =" colorOnPrimaryContainer " >@color/shrine_pink_900</item >
376
+ <item name =" shapeAppearanceCornerLarge " >@style/ShapeAppearance.App.Corner.Large </item >
377
377
</style >
378
378
```
379
379
@@ -390,18 +390,3 @@ Use the styles in the layout, which affects only this bottom app bar and FAB:
390
390
style =" @style/Widget.App.FloatingActionButton"
391
391
/>
392
392
```
393
-
394
- In code:
395
-
396
- ``` kt
397
- val topEdge = BottomAppBarCutCornersTopEdge (
398
- bottomAppBar.fabCradleMargin,
399
- bottomAppBar.fabCradleRoundedCornerRadius,
400
- bottomAppBar.cradleVerticalOffset
401
- )
402
- val background = bottomAppBar.background as MaterialShapeDrawable
403
- background.shapeAppearanceModel = background.shapeAppearanceModel.toBuilder().setTopEdge(topEdge).build()
404
- ```
405
-
406
- ** Note:** Using ` BottomAppBarCutCornersTopEdge ` is not necessary with rounded
407
- shapeAppearance corners.
0 commit comments