@@ -48,7 +48,7 @@ public final class LinearProgressIndicatorSpec extends BaseProgressIndicatorSpec
48
48
49
49
boolean drawHorizontallyInverse ;
50
50
51
- /** The size of the stop indicator at the end of the track. */
51
+ /** The desired size of the stop indicator at the end of the track. */
52
52
@ Px public int trackStopIndicatorSize ;
53
53
54
54
/** The padding of the stop indicator at the end of the track. */
@@ -102,9 +102,7 @@ public LinearProgressIndicatorSpec(
102
102
R .styleable .LinearProgressIndicator_indicatorDirectionLinear ,
103
103
LinearProgressIndicator .INDICATOR_DIRECTION_LEFT_TO_RIGHT );
104
104
trackStopIndicatorSize =
105
- min (
106
- a .getDimensionPixelSize (R .styleable .LinearProgressIndicator_trackStopIndicatorSize , 0 ),
107
- trackThickness );
105
+ a .getDimensionPixelSize (R .styleable .LinearProgressIndicator_trackStopIndicatorSize , 0 );
108
106
if (a .hasValue (R .styleable .LinearProgressIndicator_trackStopIndicatorPadding )) {
109
107
trackStopIndicatorPadding =
110
108
a .getDimensionPixelSize (R .styleable .LinearProgressIndicator_trackStopIndicatorPadding , 0 );
@@ -143,6 +141,11 @@ public int getTrackInnerCornerRadiusInPx() {
143
141
: trackInnerCornerRadius ;
144
142
}
145
143
144
+ @ Px
145
+ int getActualTrackStopIndicatorSize () {
146
+ return min (trackStopIndicatorSize , trackThickness );
147
+ }
148
+
146
149
@ Override
147
150
public boolean useStrokeCap () {
148
151
return super .useStrokeCap () && getTrackInnerCornerRadiusInPx () == getTrackCornerRadiusInPx ();
0 commit comments