Loading core/java/com/android/internal/widget/NotificationProgressBar.java +3 −1 Original line number Original line Diff line number Diff line Loading @@ -226,7 +226,9 @@ public final class NotificationProgressBar extends ProgressBar implements } } @NonNull @NonNull private NotificationProgressDrawable getNotificationProgressDrawable() { public NotificationProgressDrawable getNotificationProgressDrawable() { if (mNotificationProgressDrawable != null) return mNotificationProgressDrawable; final Drawable d = getProgressDrawable(); final Drawable d = getProgressDrawable(); if (d == null) { if (d == null) { throw new IllegalStateException("getProgressDrawable() returns null"); throw new IllegalStateException("getProgressDrawable() returns null"); Loading core/java/com/android/internal/widget/NotificationProgressDrawable.java +28 −0 Original line number Original line Diff line number Diff line Loading @@ -90,6 +90,34 @@ public final class NotificationProgressDrawable extends Drawable { return mState.mPointRadius; return mState.mPointRadius; } } /** * <p>Set the segment height for the drawable.</p> * <p>Note: changing this property will affect all instances of a drawable loaded from a * resource. It is recommended to invoke {@link #mutate()} before changing this property.</p> * * @param height The height of the segments * @see #mutate() */ public void setSegmentHeight(float height) { mState.mSegmentHeight = height; invalidateSelf(); } /** * <p>Set the faded segment height for the drawable.</p> * <p>Note: changing this property will affect all instances of a drawable loaded from a * resource. It is recommended to invoke {@link #mutate()} before changing this property.</p> * * @param height The height of the faded segments * @see #mutate() */ public void setFadedSegmentHeight(float height) { mState.mFadedSegmentHeight = height; invalidateSelf(); } /** /** * Set the segments and points that constitute the drawable. * Set the segments and points that constitute the drawable. */ */ Loading Loading
core/java/com/android/internal/widget/NotificationProgressBar.java +3 −1 Original line number Original line Diff line number Diff line Loading @@ -226,7 +226,9 @@ public final class NotificationProgressBar extends ProgressBar implements } } @NonNull @NonNull private NotificationProgressDrawable getNotificationProgressDrawable() { public NotificationProgressDrawable getNotificationProgressDrawable() { if (mNotificationProgressDrawable != null) return mNotificationProgressDrawable; final Drawable d = getProgressDrawable(); final Drawable d = getProgressDrawable(); if (d == null) { if (d == null) { throw new IllegalStateException("getProgressDrawable() returns null"); throw new IllegalStateException("getProgressDrawable() returns null"); Loading
core/java/com/android/internal/widget/NotificationProgressDrawable.java +28 −0 Original line number Original line Diff line number Diff line Loading @@ -90,6 +90,34 @@ public final class NotificationProgressDrawable extends Drawable { return mState.mPointRadius; return mState.mPointRadius; } } /** * <p>Set the segment height for the drawable.</p> * <p>Note: changing this property will affect all instances of a drawable loaded from a * resource. It is recommended to invoke {@link #mutate()} before changing this property.</p> * * @param height The height of the segments * @see #mutate() */ public void setSegmentHeight(float height) { mState.mSegmentHeight = height; invalidateSelf(); } /** * <p>Set the faded segment height for the drawable.</p> * <p>Note: changing this property will affect all instances of a drawable loaded from a * resource. It is recommended to invoke {@link #mutate()} before changing this property.</p> * * @param height The height of the faded segments * @see #mutate() */ public void setFadedSegmentHeight(float height) { mState.mFadedSegmentHeight = height; invalidateSelf(); } /** /** * Set the segments and points that constitute the drawable. * Set the segments and points that constitute the drawable. */ */ Loading