From bac8e12ebd8ed143cd2f1974280f0495c837def4 Mon Sep 17 00:00:00 2001 From: Alan Viverette Date: Wed, 4 Feb 2015 17:15:01 -0800 Subject: [PATCH] Move layer-list to be top-level element in seek bar progress There is a bug in , but this works around it for now. Removes the previous fix, which broke the initial state due to the level not propagating when the current drawable was swapped out. Bug: 19269656 Change-Id: Ibe586ef4ea326a7ce7516ca42a369c5386c24359 --- core/java/android/widget/ProgressBar.java | 2 +- .../scrubber_progress_horizontal_material.xml | 52 +++++++++++-------- 2 files changed, 30 insertions(+), 24 deletions(-) diff --git a/core/java/android/widget/ProgressBar.java b/core/java/android/widget/ProgressBar.java index 4d687cd02d323..de1bbc7affad1 100644 --- a/core/java/android/widget/ProgressBar.java +++ b/core/java/android/widget/ProgressBar.java @@ -1241,7 +1241,7 @@ public class ProgressBar extends View { private synchronized void doRefreshProgress(int id, int progress, boolean fromUser, boolean callBackToApp) { float scale = mMax > 0 ? (float) progress / (float) mMax : 0; - final Drawable d = mCurrentDrawable.getCurrent(); + final Drawable d = mCurrentDrawable; if (d != null) { Drawable progressDrawable = null; diff --git a/core/res/res/drawable/scrubber_progress_horizontal_material.xml b/core/res/res/drawable/scrubber_progress_horizontal_material.xml index f2ea30f3c5c62..89a1787df6777 100644 --- a/core/res/res/drawable/scrubber_progress_horizontal_material.xml +++ b/core/res/res/drawable/scrubber_progress_horizontal_material.xml @@ -14,29 +14,35 @@ limitations under the License. --> - - + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file