Skip to content

Commit 316c68e

Browse files
pekingmewcshi
authored andcommitted
[ProgressIndicator] Corrected comments for javadoc.
PiperOrigin-RevId: 343570043 (cherry picked from commit 3795197)
1 parent 23b5eb0 commit 316c68e

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

lib/java/com/google/android/material/progressindicator/BaseProgressIndicator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
*
6060
* <ul>
6161
* <li>{@code trackThickness}: the thickness of the indicator and track.
62-
* <li>{@code indicatorColor}: the color of the indicator.
62+
* <li>{@code indicatorColor}: the color(s) of the indicator.
6363
* <li>{@code trackColor}: the color of the track.
6464
* <li>{@code trackCornerRadius}: the radius of the rounded corner of the indicator and track.
6565
* <li>{@code showAnimationBehavior}: the animation direction to show the indicator and track.
@@ -538,7 +538,7 @@ public int getTrackThickness() {
538538
/**
539539
* Sets the track thickness of this progress indicator.
540540
*
541-
* @param trackThickness The new indicator size in pixel.
541+
* @param trackThickness The new track/indicator thickness in pixels.
542542
* @see #getTrackThickness()
543543
* @attr ref
544544
* com.google.android.material.progressindicator.R.stylable#BaseProgressIndicator_trackThickness

lib/java/com/google/android/material/progressindicator/BaseProgressIndicatorSpec.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
* reflect the attributes defined in {@link R.styleable#BaseProgressIndicator}.
4141
*/
4242
public abstract class BaseProgressIndicatorSpec {
43-
/** The thickness of the progress track and indicator. */
43+
/** The thickness of the track and indicator. */
4444
@Px public int trackThickness;
4545

4646
/**
@@ -51,13 +51,12 @@ public abstract class BaseProgressIndicatorSpec {
5151
@Px public int trackCornerRadius;
5252

5353
/**
54-
* The color array of the progress stroke. In determinate mode and single color indeterminate
55-
* mode, only the first item will be used.
54+
* The color array used in the indicator. In determinate mode, only the first item will be used.
5655
*/
5756
@NonNull public int[] indicatorColors = new int[0];
5857

5958
/**
60-
* The color used for the progress track. If not defined, it will be set to the indicatorColor and
59+
* The color used in the track. If not defined, it will be set to the indicatorColors and
6160
* apply the first disable alpha value from the theme.
6261
*/
6362
@ColorInt public int trackColor;
@@ -71,7 +70,7 @@ public abstract class BaseProgressIndicatorSpec {
7170
/**
7271
* Instantiates BaseProgressIndicatorSpec.
7372
*
74-
* <p>If attributes are missing, the values stored in the default style {@link
73+
* <p>If attributes are missing, the values defined in the default style {@link
7574
* R.style#Widget_MaterialComponents_ProgressIndicator} will be loaded.
7675
*
7776
* @param context Current themed context.

lib/java/com/google/android/material/progressindicator/CircularProgressIndicator.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
*
4141
* <ul>
4242
* <li>{@code trackThickness}: the thickness of the indicator and track.
43-
* <li>{@code indicatorColor}: the color of the indicator.
43+
* <li>{@code indicatorColor}: the color(s) of the indicator.
4444
* <li>{@code trackColor}: the color of the track.
4545
* <li>{@code trackCornerRadius}: the radius of the rounded corner of the indicator and track.
4646
* <li>{@code indicatorSize}: the outer diameter of the spinner.
@@ -90,11 +90,13 @@ private void initializeDrawables() {
9090
// **************** Getters and setters ****************
9191

9292
/**
93-
* Sets the indicator size of this progress indicator.
93+
* Sets the track thickness of this progress indicator.
9494
*
95-
* @param trackThickness The new indicator size in pixel.
96-
* @throws IllegalArgumentException if indicator radius is less than half of the new indicator
97-
* size.
95+
* @param trackThickness The new track/indicator thickness in pixel.
96+
* @see #getTrackThickness()
97+
* @attr ref
98+
* com.google.android.material.progressindicator.R.stylable#BaseProgressIndicator_trackThickness
99+
* @throws IllegalArgumentException if indicator size is less than twice of the track thickness.
98100
*/
99101
@Override
100102
public void setTrackThickness(int trackThickness) {
@@ -130,7 +132,7 @@ public void setIndicatorInset(@Px int indicatorInset) {
130132
}
131133

132134
/**
133-
* Returns the radius of this progress indicator.
135+
* Returns the size (outer diameter) of this progress indicator.
134136
*
135137
* @see #setIndicatorSize(int)
136138
* @attr ref

lib/java/com/google/android/material/progressindicator/LinearProgressIndicator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
*
4343
* <ul>
4444
* <li>{@code trackThickness}: the thickness of the indicator and track.
45-
* <li>{@code indicatorColor}: the color of the indicator.
45+
* <li>{@code indicatorColor}: the color(s) of the indicator.
4646
* <li>{@code trackColor}: the color of the track.
4747
* <li>{@code trackCornerRadius}: the radius of the rounded corner of the indicator and track.
4848
* <li>{@code indeterminateAnimationType}: the type of indeterminate animation.

0 commit comments

Comments
 (0)