|
1 | 1 | # Buttons
|
2 | 2 |
|
3 |
| -A collection of material buttons, including a Flat button, a Raised button and a Floating button. |
| 3 | +Buttons is a collection of material buttons, including a flat button, a raised button and a floating |
| 4 | +action button. |
4 | 5 |
|
5 |
| -The Flat button does not have its own background color and does not raise when touched. A Flat |
6 |
| -button should be used in most situations requiring a button. |
| 6 | +The flat button does not have its own background color and does not raise when touched. Use a flat |
| 7 | +button in most situations requiring a button. |
7 | 8 |
|
8 |
| -The Raised button has its own background color, floats above its parent slightly, and raise briefly |
9 |
| -when touched. A Raised button should be used when a Flat button would get lost among other UI |
10 |
| -elements on the screen. |
| 9 | +The raised button has its own background color. It floats above its parent slightly, and raises |
| 10 | +briefly when touched. A raised button should be used when a flat button would get lost among other |
| 11 | +UI elements on the screen. |
11 | 12 |
|
12 |
| -A Floating button is circular, floats a considerable amount above its parent, has its own background |
13 |
| -color, and also raises briefly when touched. A Floating button should only be used for the main |
14 |
| -action of a screen. |
| 13 | +The floating action button is circular, floats a considerable amount above its parent, has its own |
| 14 | +background color, and also raises briefly when touched. Only use a floating action button for the |
| 15 | +main action of a screen. |
15 | 16 |
|
16 | 17 | All buttons display animated ink splashes when the user interacts with the button.
|
17 | 18 |
|
18 | 19 | For non-flat buttons, the background color is determined from the enabled, disabled-light, and
|
19 | 20 | disabled-dark background color properties. Flat buttons have a transparent background.
|
20 | 21 |
|
21 | 22 | When disabled, material buttons take on a specific semi-transparent appearance which depends on
|
22 |
| -whether the button is on a light background or a dark background. To ensure this works correctly, |
23 |
| -the owner is responsible for setting (and updating, if necessary), the button's underlyingColor |
24 |
| -property for all buttons. |
| 23 | +whether the button is on a light background or a dark background. |
25 | 24 |
|
26 |
| -The title color of the button should be set to have an accessible contrast ratio with the button's |
27 |
| -background color. To ensure this works for Flat buttons, the caller is responsible for setting (and |
28 |
| -updating, if necessary) the button's underlyingColor property for flat buttons. |
| 25 | +Set the title color of the button to have an accessible contrast ratio with the button's background |
| 26 | +color. The caller is responsible for setting (and updating, if necessary) the button's |
| 27 | +underlyingColor property for flat buttons. |
29 | 28 |
|
30 | 29 | All buttons set the exclusiveTouch property to YES by default, which prevents users from
|
31 | 30 | simultaneously interacting with a button and other UI elements.
|
|
0 commit comments