summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/Launcher.java
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2010-08-10 22:11:35 -0700
committerAdam Cohen <adamcohen@google.com>2010-08-11 10:46:55 -0700
commitda4dc5edd82a40c3950fc8221c6363b9826204aa (patch)
tree79195b37b940ae2e26ee8fa8245fcb70796468f6 /src/com/android/launcher2/Launcher.java
parenta67e867db9d639ed2afcc97e9d04a67fc46f2669 (diff)
downloadandroid_packages_apps_Trebuchet-da4dc5edd82a40c3950fc8221c6363b9826204aa.tar.gz
android_packages_apps_Trebuchet-da4dc5edd82a40c3950fc8221c6363b9826204aa.tar.bz2
android_packages_apps_Trebuchet-da4dc5edd82a40c3950fc8221c6363b9826204aa.zip
-> Set grid to 8x7 with proper spacing for landscape/portrait
-> Added a button to the top left of Launcher which switches between landscape and portrait. For testing purposes only. Change-Id: I01f8cfcf92c8ba7727eeba0e59a0b8ff055598fe
Diffstat (limited to 'src/com/android/launcher2/Launcher.java')
-rw-r--r--src/com/android/launcher2/Launcher.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 008b6361c..d7ce6f26c 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -1625,6 +1625,19 @@ public final class Launcher extends Activity
}
/**
+ * Temporary: to allow us to test rotation in the launcher.
+ *
+ * @param v The view that was clicked.
+ */
+ public void onClickRotateButton(View v) {
+ // TODO: this method is temporary. Remove it.
+ setRequestedOrientation(
+ (getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)
+ ? ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
+ : ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+ }
+
+ /**
* Event handler for the "grid" button that appears on the home screen, which
* enters all apps mode.
*