summaryrefslogtreecommitdiffstats
path: root/res/raw
diff options
context:
space:
mode:
authorJoe Onorato <joeo@android.com>2010-03-18 17:12:52 -0700
committerJoe Onorato <joeo@android.com>2010-03-18 17:12:52 -0700
commit20e7a5665807f5a1ef294f6a271b6b15f69e34e4 (patch)
treed0da7e1f0b4fe4c1241227ca1f76b0e2bfdd75e1 /res/raw
parent8fddf15e6fcfc8bca0bf971c9792b18eb8afc5c4 (diff)
downloadandroid_packages_apps_Trebuchet-20e7a5665807f5a1ef294f6a271b6b15f69e34e4.tar.gz
android_packages_apps_Trebuchet-20e7a5665807f5a1ef294f6a271b6b15f69e34e4.tar.bz2
android_packages_apps_Trebuchet-20e7a5665807f5a1ef294f6a271b6b15f69e34e4.zip
Fix 2524488 Not able to launch app in the last line of app launcher in landscape mode
Change-Id: Iffe3e95a10e49f1dadcab2f4f177e79c0140699e
Diffstat (limited to 'res/raw')
-rw-r--r--res/raw/allapps.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/res/raw/allapps.rs b/res/raw/allapps.rs
index e28ab0a79..af5abd311 100644
--- a/res/raw/allapps.rs
+++ b/res/raw/allapps.rs
@@ -28,6 +28,8 @@ float g_MoveToTotalTime;
float g_MoveToTime;
float g_MoveToOldPos;
+int g_Cols;
+int g_Rows;
// Drawing constants, should be parameters ======
#define VIEW_ANGLE 1.28700222f
@@ -388,10 +390,14 @@ main(int launchID)
// icons & labels
int iconCount = state->iconCount;
- g_PosMax = ((iconCount + 3) / 4) - 4;
if (getWidth() > getHeight()) {
- g_PosMax -= 2;
+ g_Cols = 6;
+ g_Rows = 3;
+ } else {
+ g_Cols = 4;
+ g_Rows = 4;
}
+ g_PosMax = ((iconCount + (g_Cols-1)) / g_Cols) - g_Rows;
if (g_PosMax < 0) g_PosMax = 0;
updatePos();