diff options
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/SwipeHelper.java')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/SwipeHelper.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/SwipeHelper.java b/packages/SystemUI/src/com/android/systemui/SwipeHelper.java index 0d393bf..f206e56 100644 --- a/packages/SystemUI/src/com/android/systemui/SwipeHelper.java +++ b/packages/SystemUI/src/com/android/systemui/SwipeHelper.java @@ -311,11 +311,14 @@ public class SwipeHelper implements Gefingerpoken { final View animView = mCallback.getChildContentView(view); final boolean canAnimViewBeDismissed = mCallback.canChildBeDismissed(view); float newPos; + boolean isLayoutRtl = view.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL; if (velocity < 0 || (velocity == 0 && getTranslation(animView) < 0) // if we use the Menu to dismiss an item in landscape, animate up - || (velocity == 0 && getTranslation(animView) == 0 && mSwipeDirection == Y)) { + || (velocity == 0 && getTranslation(animView) == 0 && mSwipeDirection == Y) + // if the language is rtl we prefer swiping to the left + || (velocity == 0 && getTranslation(animView) == 0 && isLayoutRtl)) { newPos = -getSize(animView); } else { newPos = getSize(animView); |