@@ -9,16 +9,75 @@ path: /catalog/loading-indicators/
99
1010# Loading Indicators
1111
12- Loading indicators express an unspecified wait time of a process.
12+ [ Loading indicators] ( https://m3.material.io/components/loading-indicator/overview )
13+ show the progress for a short wait time. It has two configurations.
1314
14- ![ Animation of loading indicator] ( assets/loadingindicator/loading_indicator .gif )
15+ ![ Loading indicator configurations ] ( assets/loadingindicator/loadingindicator-configurations .gif )
1516
16- ** Contents**
17+ 1 . Default (contained)
18+ 2 . Uncontained
1719
18- * [ Using loading indicators] ( #using-progress-indicators )
19- * [ Anatomy and key properties] ( #anatomy-and-key-properties )
20+ ** Note:** Images use various dynamic color schemes.
2021
21- ## Using loading indicators
22+ ## Design & API documentation
23+
24+ * [ Material 3 (M3) spec] ( https://m3.material.io/components/loading-indicator/overview )
25+
26+ ## Anatomy
27+
28+ ![ Loading indicator anatomy] ( assets/loadingindicator/anatomy.png )
29+
30+ 1 . Active indicator
31+ 2 . Container (optional)
32+
33+ More details on anatomy items in the
34+ [ component guidelines] ( https://m3.material.io/components/loading-indicator/guidelines#a6bb9df2-568a-41d4-a4e9-08ac8f844a7d ) .
35+
36+ ## M3 Expressive
37+
38+ ### M3 Expressive update
39+
40+ The loading indicator is a new component added to the library in the M3
41+ Expressive update.
42+
43+ The loading indicator is designed to show progress that loads in under five
44+ seconds. It should replace most uses of the indeterminate circular progress
45+ indicator.
46+ [ More on M3 Expressive] ( https://m3.material.io/blog/building-with-m3-expressive )
47+
48+ ** Loading indicators:**
49+
50+ * Can be contained or uncontained
51+ * Use shape and motion to capture attention
52+ * Can scale in size
53+
54+ ## Key properties
55+
56+ #### Attributes
57+
58+ Element | Attribute | Related method(s) | Default value
59+ -------------------- | --------------------- | --------------------------------------------- | -------------
60+ ** Indicator color** | ` app:indicatorColor ` | ` setIndicatorColor ` </br >` getIndicatorColor ` | ` colorPrimary `
61+ ** Container color** | ` app:containerColor ` | ` setContainerColor ` </br >` getContainerColor ` | ` transparent `
62+ ** Indicator size** | ` app:indicatorSize ` | ` setIndicatorSize ` </br >` getIndicatorSize ` | 38dp
63+ ** Container width** | ` app:containerWidth ` | ` setContainerWidth ` </br >` getContainerWidth ` | 48dp
64+ ** Container height** | ` app:containerHeight ` | ` setContainerHeight ` </br >` getContainerHeight ` | 48dp
65+
66+ #### Styles
67+
68+ Element | Style
69+ ------------------- | ---------------------------------------------
70+ ** Default style** | ` Widget.Material3.LoadingIndicator `
71+ ** Contained style** | ` Widget.Material3.LoadingIndicator.Contained `
72+
73+ Default theme attribute: ` ?attr/loadingIndicatorStyle `
74+
75+ See the full list of
76+ [ styles] ( https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/loadingindicator/res/values/styles.xml )
77+ and
78+ [ attributes] ( https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/loadingindicator/res/values/attrs.xml ) .
79+
80+ ## Code implementation
2281
2382Before you can use Material loading indicators, you need to add a dependency to
2483the Material Components for Android library. For more information, go to the
@@ -34,7 +93,17 @@ indeterminate circular progress indicators.
3493** Note:** Use progress indicators, if the processes can transition from
3594indeterminate to determinate.
3695
37- ### Usage
96+ ### Adding loading indicators
97+
98+ Loading indicators capture attention through motion. It morphs the shape in a
99+ sequence with potential color change, if multiple colors are specified for the
100+ indicator. A fully rounded container is optionally drawn behind the morphing
101+ shape.
102+
103+ Source code:
104+
105+ * ` LoadingIndicator `
106+ * [ Class source] ( https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/loadingindicator/LoadingIndicator.java )
38107
39108A loading indicator can be added to a layout:
40109
@@ -59,8 +128,8 @@ A loading indicator can be added to a layout:
59128
60129### Making loading indicators accessible
61130
62- Loading indicators have support very limited user interactions. Please consider
63- setting the content descriptor for use with screen readers.
131+ Loading indicators have limited support for user interactions. Please
132+ consider setting the content descriptor for use with screen readers.
64133
65134That can be done in XML via the ` android:contentDescription ` attribute or
66135programmatically like so:
@@ -71,48 +140,3 @@ loadingIndicator.contentDescription = contentDescription
71140
72141For contained loading indicators, please ensure the indicator color and the
73142container color have enough contrast (3:1).
74-
75- ## Loading indicators
76-
77- Loading indicators capture attention through motion. It morphs the shape in a
78- sequence with potential color change, if multiple colors are specified for the
79- indicator. A fully rounded container is optionally drawn behind the morphing
80- shape.
81-
82- Source code:
83-
84- * ` LoadingIndicator `
85- * [ Class source] ( https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/loadingindicator/LoadingIndicator.java )
86-
87- ### Anatomy and key properties
88-
89- A loading indicator consists of an optional container and an indicator.
90-
91- ![ Loading indicator anatomy] ( assets/loadingindicator/anatomy.png )
92-
93- 1 . Active indicator
94- 2 . Container
95-
96- #### Attributes
97-
98- Element | Attribute | Related method(s) | Default value
99- -------------------- | --------------------- | --------------------------------------------- | -------------
100- ** Indicator color** | ` app:indicatorColor ` | ` setIndicatorColor ` </br >` getIndicatorColor ` | ` colorPrimary `
101- ** Container color** | ` app:containerColor ` | ` setContainerColor ` </br >` getContainerColor ` | ` transparent `
102- ** Indicator size** | ` app:indicatorSize ` | ` setIndicatorSize ` </br >` getIndicatorSize ` | 38dp
103- ** Container width** | ` app:containerWidth ` | ` setContainerWidth ` </br >` getContainerWidth ` | 48dp
104- ** Container height** | ` app:containerHeight ` | ` setContainerHeight ` </br >` getContainerHeight ` | 48dp
105-
106- #### Styles
107-
108- Element | Style
109- ------------------- | ---------------------------------------------
110- ** Default style** | ` Widget.Material3.LoadingIndicator `
111- ** Contained style** | ` Widget.Material3.LoadingIndicator.Contained `
112-
113- Default theme attribute: ` ?attr/loadingIndicatorStyle `
114-
115- See the full list of
116- [ styles] ( https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/loadingindicator/res/values/styles.xml )
117- and
118- [ attributes] ( https://github.com/material-components/material-components-android/tree/master/lib/java/com/google/android/material/loadingindicator/res/values/attrs.xml ) .
0 commit comments