diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-05-14 00:07:08 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2015-05-14 12:28:07 -0700 |
commit | 7066003b2032a49ae5e59dab9b706259bdeb7e6e (patch) | |
tree | 3e3720740c905cf22dc1c96e6123c1bb7bec60e5 /src/com/android/launcher3/FolderPagedView.java | |
parent | 5a92b2356f1c5f79207c4e9bd47d7b0b5bcf6f78 (diff) | |
download | android_packages_apps_Trebuchet-7066003b2032a49ae5e59dab9b706259bdeb7e6e.tar.gz android_packages_apps_Trebuchet-7066003b2032a49ae5e59dab9b706259bdeb7e6e.tar.bz2 android_packages_apps_Trebuchet-7066003b2032a49ae5e59dab9b706259bdeb7e6e.zip |
Various lint error fixes.
> Fixing some RTL errors by specifying both marginStart and marginLeft
> Moving all layout direction checks to Utilities
> Explicitely adding @TargetApi before every method
Change-Id: Ibe9c52b93b5a6adeadb27ace2b312770fd732ea0
Diffstat (limited to 'src/com/android/launcher3/FolderPagedView.java')
-rw-r--r-- | src/com/android/launcher3/FolderPagedView.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/launcher3/FolderPagedView.java b/src/com/android/launcher3/FolderPagedView.java index a6494d274..94c016dd3 100644 --- a/src/com/android/launcher3/FolderPagedView.java +++ b/src/com/android/launcher3/FolderPagedView.java @@ -55,7 +55,7 @@ public class FolderPagedView extends PagedView { private static final int[] sTempPosArray = new int[2]; - public final boolean rtlLayout; + public final boolean mIsRtl; private final LayoutInflater mInflater; private final IconCache mIconCache; @@ -89,7 +89,7 @@ public class FolderPagedView extends PagedView { mInflater = LayoutInflater.from(context); mIconCache = app.getIconCache(); - rtlLayout = getResources().getConfiguration().getLayoutDirection() == LAYOUT_DIRECTION_RTL; + mIsRtl = Utilities.isRtl(getResources()); setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_YES); } @@ -439,7 +439,7 @@ public class FolderPagedView extends PagedView { * Scrolls the current view by a fraction */ public void showScrollHint(int direction) { - float fraction = (direction == DragController.SCROLL_LEFT) ^ rtlLayout + float fraction = (direction == DragController.SCROLL_LEFT) ^ mIsRtl ? -SCROLL_HINT_FRACTION : SCROLL_HINT_FRACTION; int hint = (int) (fraction * getWidth()); int scroll = getScrollForPage(getNextPage()) + hint; @@ -596,7 +596,7 @@ public class FolderPagedView extends PagedView { } }; v.animate() - .translationXBy((direction > 0 ^ rtlLayout) ? -v.getWidth() : v.getWidth()) + .translationXBy((direction > 0 ^ mIsRtl) ? -v.getWidth() : v.getWidth()) .setDuration(REORDER_ANIMATION_DURATION) .setStartDelay(0) .withEndAction(endAction); |