Skip to content

Commit 712dd8e

Browse files
leticiarossipekingme
authored andcommitted
[Documentation] Fixed ordering of headers.
PiperOrigin-RevId: 353022345
1 parent 32f73bb commit 712dd8e

File tree

4 files changed

+22
-20
lines changed

4 files changed

+22
-20
lines changed

docs/contributing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,18 @@ whitespace, Material Components for Android uses code conventions and styles to
5656
encourage consistency. Code with a consistent style is easier (and less
5757
error-prone!) to review, maintain, and understand.
5858

59-
#### Be consistent
59+
### Be consistent
6060

6161
If the style guide is not explicit about a particular situation, the cardinal
6262
rule is to **be consistent**. For example, take a look at the surrounding code
6363
and follow its lead, or look for similar cases elsewhere in the codebase.
6464

65-
#### Java
65+
### Java
6666

6767
We follow the
6868
[Google Java Style Guide](https://google.github.io/styleguide/javaguide.html).
6969

70-
#### XML
70+
### XML
7171

7272
- 2 space indentation
7373
- Resource naming (including IDs) is `lowercase_with_underscores`

docs/getting-started.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Take a look at our
1212
that helps you migrate your codebase from the Design Support Library to Material
1313
Components for Android.
1414

15+
## Instructions
16+
1517
### 1. Depend on our library
1618

1719
Material Components for Android is available through Google's Maven Repository.
@@ -46,7 +48,7 @@ or
4648
[MVN Repository](https://mvnrepository.com/artifact/com.google.android.material/material)
4749
to find the latest version of the library.
4850
49-
##### New Namespace and AndroidX
51+
#### New Namespace and AndroidX
5052
5153
If your app currently depends on the original Design Support Library, you can
5254
make use of the

docs/theming/Dark.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ Android system UI and apps running on the device.
2828
- [Android Q Dark Theme Documentation][dark-theme-dac-docs]
2929
- [AppCompat DayNight Documentation][daynight-appcompat-docs]
3030

31-
### Setup
31+
## Setup
3232

3333
In order to support the dark theme functionality in Android Q, make sure you are
3434
depending on the `1.1.0` stable version of the
3535
[Material Android library][maven-repo-mdc] or later, and update your app theme
3636
to inherit from `Theme.MaterialComponents.DayNight` (or one of its descendants).
3737
E.g.:
3838

39-
##### res/values/themes.xml
39+
**res/values/themes.xml**
4040

4141
```xml
4242
<style name="Theme.MyApp" parent="Theme.MaterialComponents.DayNight">
@@ -48,15 +48,15 @@ Alternatively, if you want to define separate `Light` and `Dark` themes for your
4848
app, you can inherit from `Theme.MaterialComponents.Light` in the `values`
4949
directory, and `Theme.MaterialComponents` in the `values-night` directory. E.g.:
5050

51-
##### res/values/themes.xml
51+
**res/values/themes.xml**
5252

5353
```xml
5454
<style name="Theme.MyApp" parent="Theme.MaterialComponents.Light">
5555
<!-- ... -->
5656
</style>
5757
```
5858

59-
##### res/values-night/themes.xml
59+
**res/values-night/themes.xml**
6060

6161
```xml
6262
<style name="Theme.MyApp" parent="Theme.MaterialComponents">
@@ -70,7 +70,7 @@ facilitate easy switching between your app's `Light` and `Dark` theme. If using
7070
a `DayNight` theme, you can define one app theme that references color
7171
resources, which can be overridden in the `values-night` directory if needed.
7272

73-
### Catalog
73+
## Catalog
7474

7575
To see how Material components adapt in a dark theme, build and run the
7676
[Catalog app](../catalog-app.md) and enable dark theme in one of the following
@@ -80,7 +80,7 @@ ways:
8080
* Android Q: `Settings > Display > Dark Theme` (or Dark Theme tile in Notification Tray)
8181
* Android P: `Settings > System > Developer options > Night mode`
8282

83-
### Color Palette
83+
## Color Palette
8484

8585
At the core of any dark theme is a color palette that uses dark background
8686
colors and light foreground colors. The Material `Dark` themes make use of the
@@ -96,7 +96,7 @@ branded palette, including `colorPrimary` and `colorSecondary`. See the
9696
[Material Dark Theme spec][dark-theme-mdc-spec-ui-application] for guidance on
9797
how you can adjust your brand colors for dark theme.
9898

99-
#### Primary vs. Surface Coloring for Large Surfaces
99+
### Primary vs. Surface Coloring for Large Surfaces
100100

101101
According to the
102102
[Material Dark Theme spec][dark-theme-mdc-spec-custom-application], large
@@ -125,7 +125,7 @@ dark theme. E.g.:
125125
* `Widget.MaterialComponents.TabLayout.PrimarySurface`
126126
* `Widget.MaterialComponents.Toolbar.PrimarySurface`
127127

128-
### Elevation Overlays
128+
## Elevation Overlays
129129

130130
In addition to the color palette adjustments mentioned above, communicating the
131131
hierarchy of a UI via elevation requires some dark theme specific
@@ -147,7 +147,7 @@ Note: we avoid overdraw with the elevation overlays by calculating a composite
147147
blend of the surface color with the overlay color and using that as the
148148
surface's background, instead of drawing another layer to the canvas.
149149

150-
#### Affected Components
150+
### Affected Components
151151

152152
The following is a list of Material components that support elevation overlays
153153
in dark theme, because they use `colorSurface` and can be elevated:
@@ -163,7 +163,7 @@ in dark theme, because they use `colorSurface` and can be elevated:
163163
* [Navigation Drawer](../components/NavigationDrawer.md)
164164
* [Switch](../components/Switch.md)
165165

166-
#### Theme Attributes
166+
### Theme Attributes
167167

168168
In order to facilitate some orchestration around the elevation overlays, we have
169169
the following theme attributes:
@@ -177,13 +177,13 @@ Note: If inheriting from the `Theme.MaterialComponents` theme or a descendant,
177177
you most likely do not have to set these attributes yourself because the
178178
Material themes already set up the above defaults.
179179

180-
#### Custom Views & Non-Material Components
180+
### Custom Views & Non-Material Components
181181

182182
If you would like to apply dark theme elevation overlays to your custom views or
183183
any non-Material views that are elevated surfaces, then you can use the
184184
`MaterialShapeDrawable` or `ElevationOverlayProvider` APIs.
185185

186-
##### MaterialShapeDrawable
186+
#### MaterialShapeDrawable
187187

188188
The key to supporting elevation overlays in a custom view is creating a
189189
`MaterialShapeDrawable` with the overlay support enabled via
@@ -198,7 +198,7 @@ will keep track of the elevation value for you and factor that in to the overlay
198198
any time elevation changes, and you don't have to worry about incorrectly
199199
compounding the overlays multiple times.
200200

201-
##### ElevationOverlayProvider
201+
#### ElevationOverlayProvider
202202

203203
If you have a case where the elevation value is more static and you would like
204204
to get the corresponding dark theme overlay color (perhaps to color an existing
@@ -216,7 +216,7 @@ color, or get access to lower level values such as the overlay alpha
216216
percentages, take a look at the other `ElevationOverlayProvider` methods
217217
including `compositeOverlayIfNeeded`, `compositeOverlay`, and `calculateOverlayAlpha`.
218218

219-
##### Absolute Elevation
219+
#### Absolute Elevation
220220

221221
When calculating the elevation overlay alpha percentage, Material components
222222
factor in the absolute elevation of their parent view. This is because the

docs/theming/Motion.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ the
3535
[Android Transition Framework](https://developer.android.com/training/transitions)
3636
(`android.transition`):
3737

38-
#### AndroidX (preferred)
38+
**AndroidX (preferred)**
3939

4040
* Available in the `com.google.android.material.transition` package
4141
* Supports API Level 14+
4242
* Supports Fragments and Views, but not Activities or Windows
4343
* Contains backported bug fixes and consistent behavior across API Levels
4444

45-
#### Platform
45+
**Platform**
4646

4747
* Available in the `com.google.android.material.transition.platform` package
4848
* Supports API Level 21+

0 commit comments

Comments
 (0)