Loading core/java/android/widget/AbsSeekBar.java +8 −5 Original line number Diff line number Diff line Loading @@ -403,23 +403,26 @@ public abstract class AbsSeekBar extends ProgressBar { } private void updateThumbAndTrackPos(int w, int h) { final int paddedHeight = h - mPaddingTop - mPaddingBottom; final Drawable track = getCurrentDrawable(); final Drawable thumb = mThumb; // The max height does not incorporate padding, whereas the height // parameter does. final int trackHeight = Math.min(mMaxHeight, h - mPaddingTop - mPaddingBottom); final int trackHeight = Math.min(mMaxHeight, paddedHeight); final int thumbHeight = thumb == null ? 0 : thumb.getIntrinsicHeight(); // Apply offset to whichever item is taller. final int trackOffset; final int thumbOffset; if (thumbHeight > trackHeight) { trackOffset = (thumbHeight - trackHeight) / 2; thumbOffset = 0; final int offsetHeight = (paddedHeight - thumbHeight) / 2; trackOffset = offsetHeight + (thumbHeight - trackHeight) / 2; thumbOffset = offsetHeight + 0; } else { trackOffset = 0; thumbOffset = (trackHeight - thumbHeight) / 2; final int offsetHeight = (paddedHeight - trackHeight) / 2; trackOffset = offsetHeight + 0; thumbOffset = offsetHeight + (trackHeight - thumbHeight) / 2; } if (track != null) { Loading core/java/android/widget/ProgressBar.java +0 −18 Original line number Diff line number Diff line Loading @@ -1235,24 +1235,6 @@ public class ProgressBar extends View { } } private void setDrawableTint(int id, ColorStateList tint, Mode tintMode, boolean fallback) { Drawable layer = null; // We expect a layer drawable, so try to find the target ID. final Drawable d = mCurrentDrawable; if (d instanceof LayerDrawable) { layer = ((LayerDrawable) d).findDrawableByLayerId(id); } if (fallback && layer == null) { layer = d; } layer.mutate(); layer.setTintList(tint); layer.setTintMode(tintMode); } private synchronized void doRefreshProgress(int id, int progress, boolean fromUser, boolean callBackToApp) { float scale = mMax > 0 ? (float) progress / (float) mMax : 0; Loading Loading
core/java/android/widget/AbsSeekBar.java +8 −5 Original line number Diff line number Diff line Loading @@ -403,23 +403,26 @@ public abstract class AbsSeekBar extends ProgressBar { } private void updateThumbAndTrackPos(int w, int h) { final int paddedHeight = h - mPaddingTop - mPaddingBottom; final Drawable track = getCurrentDrawable(); final Drawable thumb = mThumb; // The max height does not incorporate padding, whereas the height // parameter does. final int trackHeight = Math.min(mMaxHeight, h - mPaddingTop - mPaddingBottom); final int trackHeight = Math.min(mMaxHeight, paddedHeight); final int thumbHeight = thumb == null ? 0 : thumb.getIntrinsicHeight(); // Apply offset to whichever item is taller. final int trackOffset; final int thumbOffset; if (thumbHeight > trackHeight) { trackOffset = (thumbHeight - trackHeight) / 2; thumbOffset = 0; final int offsetHeight = (paddedHeight - thumbHeight) / 2; trackOffset = offsetHeight + (thumbHeight - trackHeight) / 2; thumbOffset = offsetHeight + 0; } else { trackOffset = 0; thumbOffset = (trackHeight - thumbHeight) / 2; final int offsetHeight = (paddedHeight - trackHeight) / 2; trackOffset = offsetHeight + 0; thumbOffset = offsetHeight + (trackHeight - thumbHeight) / 2; } if (track != null) { Loading
core/java/android/widget/ProgressBar.java +0 −18 Original line number Diff line number Diff line Loading @@ -1235,24 +1235,6 @@ public class ProgressBar extends View { } } private void setDrawableTint(int id, ColorStateList tint, Mode tintMode, boolean fallback) { Drawable layer = null; // We expect a layer drawable, so try to find the target ID. final Drawable d = mCurrentDrawable; if (d instanceof LayerDrawable) { layer = ((LayerDrawable) d).findDrawableByLayerId(id); } if (fallback && layer == null) { layer = d; } layer.mutate(); layer.setTintList(tint); layer.setTintMode(tintMode); } private synchronized void doRefreshProgress(int id, int progress, boolean fromUser, boolean callBackToApp) { float scale = mMax > 0 ? (float) progress / (float) mMax : 0; Loading