Skip to content

Commit

Permalink
[Docs][Switch] Updated inaccurate anatomy diagram labels and a couple…
Browse files Browse the repository at this point in the history
… of other minor tweaks.

Resolves #3165.

PiperOrigin-RevId: 501844880
  • Loading branch information
afohrman authored and raajkumars committed Jan 13, 2023
1 parent 4ecba81 commit d5a3701
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/components/Switch.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ as "Wi-fi" and "Bluetooth"](assets/switch/switch_hero.png)

## Using switches

Before you can use Material switches, you need to add a dependency to the
Before you can use Material switches, you need to add a dependency on the
Material Components for Android library. For more information, go to the
[Getting started](https://github.com/material-components/material-components-android/tree/master/docs/getting-started.md)
page.
Expand Down Expand Up @@ -59,8 +59,8 @@ indicate its current state.

**Note:** Since version 1.7.0, the new `MaterialSwitch` class will replace the
obsolete `SwitchMaterial` class. In most cases you should be able to just
replace all `SwitchMaterial` class reference with `MaterialSwitch` to enjoy the
default look and feel. Please refer to the following sections if you need to
replace all `SwitchMaterial` class reference with `MaterialSwitch` to achieve
the default look and feel. Please refer to the following sections if you need to
customize the new styles.

**Note:** For the old `SwitchMaterial` documentation, please refer to
Expand Down Expand Up @@ -125,8 +125,8 @@ track:

![Switch anatomy diagram](assets/switch/switch_anatomy.png)

1. Thumb
2. Track
1. Track
2. Thumb
3. Icon (optional)

### Switch attributes
Expand All @@ -150,7 +150,7 @@ Element | Attribute | Related method(s)
**Color** | `app:thumbIconTint` | `setThumbIconTintList`<br/>`getThumbIconTintList` | `?attr/colorSurfaceVariant` (unchecked)<br/>`?attr/colorOnPrimaryContainer` (checked)

You can add an optional icon to enhance the on/off indication of your custom
switch by assiging `app:thumbIcon`. This icon will be centered and displayed on
switch by assigning `app:thumbIcon`. This icon will be centered and displayed on
top of the thumb drawable.

### Track attributes
Expand Down

0 comments on commit d5a3701

Please sign in to comment.