diff options
author | Winson Chung <winsonc@google.com> | 2013-04-01 16:52:31 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2013-04-01 17:07:39 -0700 |
commit | fe1fe268b6d9ffd99218117795b3524a87e5110b (patch) | |
tree | 25613177ba62ffd8318b52c0923622168fd288c1 /src/com/android/launcher2/AppsCustomizePagedView.java | |
parent | e233a8bf79d624c5419805fde4bb0e025c66b020 (diff) | |
download | android_packages_apps_Trebuchet-fe1fe268b6d9ffd99218117795b3524a87e5110b.tar.gz android_packages_apps_Trebuchet-fe1fe268b6d9ffd99218117795b3524a87e5110b.tar.bz2 android_packages_apps_Trebuchet-fe1fe268b6d9ffd99218117795b3524a87e5110b.zip |
Fixing RTL issues with apps ordering and snapping to page. (Bug 8238938, Bug 8374016, Bug 8373578)
Change-Id: I57ff58a6202a2794f02cfc13ed6124b10256dbbf
Diffstat (limited to 'src/com/android/launcher2/AppsCustomizePagedView.java')
-rw-r--r-- | src/com/android/launcher2/AppsCustomizePagedView.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java index 83bc1fd40..a4a9ea9da 100644 --- a/src/com/android/launcher2/AppsCustomizePagedView.java +++ b/src/com/android/launcher2/AppsCustomizePagedView.java @@ -998,6 +998,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen public void syncAppsPageItems(int page, boolean immediate) { // ensure that we have the right number of items on the pages + final boolean isRtl = isLayoutRtl(); int numCells = mCellCountX * mCellCountY; int startIndex = page * numCells; int endIndex = Math.min(startIndex + numCells, mApps.size()); @@ -1019,6 +1020,9 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen int index = i - startIndex; int x = index % mCellCountX; int y = index / mCellCountX; + if (isRtl) { + x = mCellCountX - x - 1; + } layout.addViewToCellLayout(icon, -1, i, new PagedViewCellLayout.LayoutParams(x,y, 1,1)); items.add(info); |