diff --git a/core/java/android/widget/ProgressBar.java b/core/java/android/widget/ProgressBar.java
index 6afaba32311df..ea50e2e438ecf 100644
--- a/core/java/android/widget/ProgressBar.java
+++ b/core/java/android/widget/ProgressBar.java
@@ -354,7 +354,7 @@ public class ProgressBar extends View {
Shader.TileMode.REPEAT, Shader.TileMode.CLAMP);
shapeDrawable.getPaint().setShader(bitmapShader);
- return (clip) ? new ClipDrawable(shapeDrawable, Gravity.START,
+ return (clip) ? new ClipDrawable(shapeDrawable, Gravity.LEFT,
ClipDrawable.HORIZONTAL) : shapeDrawable;
}
@@ -1040,6 +1040,11 @@ public class ProgressBar extends View {
}
}
}
+ if (isLayoutRtl()) {
+ int tempLeft = left;
+ left = w - right;
+ right = w - tempLeft;
+ }
mIndeterminateDrawable.setBounds(left, top, right, bottom);
}
@@ -1057,7 +1062,12 @@ public class ProgressBar extends View {
// Translate canvas so a indeterminate circular progress bar with padding
// rotates properly in its animation
canvas.save();
- canvas.translate(mPaddingLeft, mPaddingTop);
+ if(isLayoutRtl()) {
+ canvas.translate(getWidth() - mPaddingRight, mPaddingTop);
+ canvas.scale(-1.0f, 1.0f);
+ } else {
+ canvas.translate(mPaddingLeft, mPaddingTop);
+ }
long time = getDrawingTime();
if (mHasAnimation) {
mAnimation.getTransformation(time, mTransformation);
diff --git a/core/res/res/drawable/progress_horizontal_holo_dark.xml b/core/res/res/drawable/progress_horizontal_holo_dark.xml
index bc1ecf37ec4ac..ff270b3cf7b9b 100644
--- a/core/res/res/drawable/progress_horizontal_holo_dark.xml
+++ b/core/res/res/drawable/progress_horizontal_holo_dark.xml
@@ -21,13 +21,11 @@
-
-
diff --git a/core/res/res/drawable/progress_horizontal_holo_light.xml b/core/res/res/drawable/progress_horizontal_holo_light.xml
index ee9b629fdfb54..493518553e679 100644
--- a/core/res/res/drawable/progress_horizontal_holo_light.xml
+++ b/core/res/res/drawable/progress_horizontal_holo_light.xml
@@ -21,13 +21,11 @@
-
-
diff --git a/core/res/res/drawable/scrubber_progress_horizontal_holo_dark.xml b/core/res/res/drawable/scrubber_progress_horizontal_holo_dark.xml
index 4d831910233d6..97cd5135c5be3 100644
--- a/core/res/res/drawable/scrubber_progress_horizontal_holo_dark.xml
+++ b/core/res/res/drawable/scrubber_progress_horizontal_holo_dark.xml
@@ -19,12 +19,10 @@
android:drawable="@android:drawable/scrubber_track_holo_dark" />
-
-
diff --git a/core/res/res/drawable/scrubber_progress_horizontal_holo_light.xml b/core/res/res/drawable/scrubber_progress_horizontal_holo_light.xml
index a3461fab77874..14e19f432b7b4 100644
--- a/core/res/res/drawable/scrubber_progress_horizontal_holo_light.xml
+++ b/core/res/res/drawable/scrubber_progress_horizontal_holo_light.xml
@@ -19,12 +19,10 @@
android:drawable="@android:drawable/scrubber_track_holo_light" />
-
-