@@ -27,7 +27,7 @@ to the Material Components for Android library. For more information, go to the
2727[ Getting started] ( https://github.com/material-components/material-components-android/tree/master/docs/getting-started.md )
2828page.
2929
30- A typical layout would look something like this:
30+ A typical layout looks like this:
3131
3232``` xml
3333<LinearLayout
@@ -150,8 +150,9 @@ badge.isVisible = true
150150badge.number = 99
151151```
152152
153- As a best practice if you need to temporarily hide the badge (e.g. until the
154- next notification is received), change the visibility of ` BadgeDrawable ` :
153+ As a best practice, if you need to temporarily hide the badge, for instance
154+ until the next notification is received, change the visibility of
155+ ` BadgeDrawable ` :
155156
156157``` kt
157158val badgeDrawable = bottomNavigation.getBadge(menuItemId)
@@ -255,14 +256,15 @@ The following is an anatomy diagram for the bottom navigation bar:
255256
256257#### Container attributes
257258
258- Element | ** Attribute** | ** Related methods** | ** Default value**
259- ------------- | -------------------- | ------------------------ | -----------------
260- ** Color** | ` app:backgroundTint ` | N/A | ` ?attr/colorSurface `
261- ** Elevation** | ` app:elevation ` | ` setElevation ` | ` 3dp `
259+ | ** Element** | ** Attribute** | ** Related | ** Default value** |
260+ : : : methods** : :
261+ | ------------- | -------------------- | -------------- | -------------------- |
262+ | ** Color** | ` app:backgroundTint ` | N/A | ` ?attr/colorSurface ` |
263+ | ** Elevation** | ` app:elevation ` | ` setElevation ` | ` 3dp ` |
262264
263265#### Navigation item attributes
264266
265- Element | ** Attribute** | ** Related methods** | ** Default value**
267+ ** Element** | ** Attribute** | ** Related methods** | ** Default value**
266268------------------------- | ------------------------- | ----------------------------------------------------- | -----------------
267269** Menu resource** | ` app:menu ` | ` inflateMenu ` <br />` getMenu ` | N/A
268270** Ripple (inactive)** | ` app:itemRippleColor ` | ` setItemRippleColor ` <br />` getItemRippleColor ` | Variations of ` ?attr/colorPrimary ` and ` ?attr/colorOnSurfaceVariant ` (see all [ states] ( https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/navigation/res/color/m3_navigation_bar_ripple_color_selector.xml ) )
@@ -271,7 +273,7 @@ Element | **Attribute** | **Related methods**
271273
272274#### Icon attributes
273275
274- Element | ** Attribute** | ** Related methods** | ** Default value**
276+ ** Element** | ** Attribute** | ** Related methods** | ** Default value**
275277-------------------- | ------------------------------------- | ---------------------------------------------------------------- | -----------------
276278** Icon** | ` android:icon ` in the ` menu ` resource | N/A | N/A
277279** Size** | ` app:itemIconSize ` | ` setItemIconSize ` <br />` setItemIconSizeRes ` <br />` getItemIconSize ` | ` 24dp `
@@ -280,7 +282,7 @@ Element | **Attribute** | **Related methods
280282
281283#### Text label attributes
282284
283- Element | ** Attribute** | ** Related methods** | ** Default value**
285+ ** Element** | ** Attribute** | ** Related methods** | ** Default value**
284286------------------------- | -------------------------------------- | ------------------------------------------------------------------- | -----------------
285287** Text label** | ` android:title ` in the ` menu ` resource | N/A | N/A
286288** Color (inactive)** | ` app:itemTextColor ` | ` setItemTextColor ` <br />` getItemTextColor ` | ` ?attr/colorOnSurfaceVariant ` (see all [ states] ( https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/navigation/res/color/m3_navigation_bar_item_with_indicator_label_tint.xml ) )
@@ -290,9 +292,9 @@ Element | **Attribute** | **Related m
290292
291293#### Styles
292294
293- Element | ** Style** | ** Container color** | ** Icon/Text label color (inactive)** | ** Icon/Text label color (active)**
294- ------------------------------ | ------------------------------------------------------ | -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | ---------------------------------------- ----------------------------------
295- ** Default style** | ` Widget.Material3.BottomNavigationView ` | ` ?attr/colorSurface ` | ` ?attr/colorOnSurfaceVariant ` | Icon: ` ?attr/colorOnSecondaryContainer ` <br /> Text: ` ?attr/colorOnSurface `
295+ ** Element** | ** Style** | ** Container color** | ** Icon/Text label color (inactive)** | ** Icon/Text label color (active)**
296+ ----------------- | --------------------------------------- | -------------------- | ------------------------------------ | ----------------------------------
297+ ** Default style** | ` Widget.Material3.BottomNavigationView ` | ` ?attr/colorSurface ` | ` ?attr/colorOnSurfaceVariant ` | Icon: ` ?attr/colorOnSecondaryContainer ` <br /> Text: ` ?attr/colorOnSurface `
296298
297299Default style theme attribute: ` ?attr/bottomNavigationStyle `
298300
305307## Theming a bottom navigation bar
306308
307309Bottom navigation supports
308- [ Material Theming] ( https://material.io/components/bottom-navigation#theming ) and
309- can be customized in terms of color and typography.
310+ [ Material Theming] ( https://material.io/components/bottom-navigation#theming ) ,
311+ which can customize color and typography.
310312
311313### Bottom navigation theming example
312314
@@ -323,8 +325,8 @@ pink background](assets/bottomnav/bottom-nav-theming.png)
323325
324326#### Implementing bottom navigation theming
325327
326- Using theme attributes and a style in ` res/values/styles.xml ` (themes all bottom
327- navigation bars and affects other components) :
328+ Use theme attributes and a style in ` res/values/styles.xml ` , which applies to
329+ all bottom navigation bars and affects other components:
328330
329331``` xml
330332<style name =" Theme.App" parent =" Theme.Material3.*" >
@@ -334,8 +336,8 @@ navigation bars and affects other components):
334336</style >
335337```
336338
337- Or using a default style theme attribute, styles, and a theme overlay (themes
338- all bottom navigation bars but does not affect other components) :
339+ Use a default style theme attribute, styles, and a theme overlay, which apply to
340+ all bottom navigation bars but do not affect other components:
339341
340342``` xml
341343<style name =" Theme.App" parent =" Theme.Material3.*" >
@@ -353,8 +355,8 @@ all bottom navigation bars but does not affect other components):
353355</style >
354356```
355357
356- Or using the style in the layout ( affects only this specific bottom navigation
357- bar) :
358+ Use the style in the layout, which affects only this specific bottom navigation
359+ bar:
358360
359361``` xml
360362<com .google.android.material.bottomnavigation.BottomNavigationView
0 commit comments