From 904e05075d5f2f9259fb8d922e394eae504441fe Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Wed, 10 Apr 2013 17:36:20 -0700 Subject: [PATCH] Issue #7341342 API request: way to determine current orientation... ...to allow for orientation locking Update API demo with new modes. Change-Id: Ib9da3ada203407bace0968f4ee3db54f03ad559b --- samples/ApiDemos/res/values/arrays.xml | 4 ++++ .../src/com/example/android/apis/app/ScreenOrientation.java | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/samples/ApiDemos/res/values/arrays.xml b/samples/ApiDemos/res/values/arrays.xml index 150861371..b06220975 100644 --- a/samples/ApiDemos/res/values/arrays.xml +++ b/samples/ApiDemos/res/values/arrays.xml @@ -121,6 +121,10 @@ REVERSE_LANDSCAPE REVERSE_PORTRAIT FULL_SENSOR + USER_LANDSCAPE + USER_PORTRAIT + FULL_USER + LOCKED diff --git a/samples/ApiDemos/src/com/example/android/apis/app/ScreenOrientation.java b/samples/ApiDemos/src/com/example/android/apis/app/ScreenOrientation.java index 3946b2a9b..01eb5246a 100644 --- a/samples/ApiDemos/src/com/example/android/apis/app/ScreenOrientation.java +++ b/samples/ApiDemos/src/com/example/android/apis/app/ScreenOrientation.java @@ -46,6 +46,10 @@ public class ScreenOrientation extends Activity { ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE, ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT, ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR, + ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE, + ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT, + ActivityInfo.SCREEN_ORIENTATION_FULL_USER, + ActivityInfo.SCREEN_ORIENTATION_LOCKED, }; @Override