diff options
author | Rahul Chaturvedi <rkc@google.com> | 2015-05-19 18:02:16 -0700 |
---|---|---|
committer | Rahul Chaturvedi <rkc@google.com> | 2015-06-01 16:50:50 -0400 |
commit | 7fc77cad3d06bd3647e550f7419e89116471240a (patch) | |
tree | e68308cd9e09774335e3339534e885edd0db124c /res/xml/launcher_preferences.xml | |
parent | cadc29c7e55cc14526878e511a85ae6c9c7e23c7 (diff) | |
download | packages_apps_Trebuchet-7fc77cad3d06bd3647e550f7419e89116471240a.tar.gz packages_apps_Trebuchet-7fc77cad3d06bd3647e550f7419e89116471240a.tar.bz2 packages_apps_Trebuchet-7fc77cad3d06bd3647e550f7419e89116471240a.zip |
Add the Allow Rotation setting to Launcher3.
This CL adds a Settings activity along with the code needed to provide
a "Allow Rotation" setting to all phones and tablets. This setting is
set to false for phones and true for tablets. On changing the setting
from unlocked to locked, the launcher (and the Settings activity)
will get locked to the orientation the user was in when he disabled
"Allow Rotation". This is consistent with how the natural rotation
feature of Android works.
Change-Id: I8a1c59d1fa0bb9262530cad96e0a9bdbab0d9344
Diffstat (limited to 'res/xml/launcher_preferences.xml')
-rw-r--r-- | res/xml/launcher_preferences.xml | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/res/xml/launcher_preferences.xml b/res/xml/launcher_preferences.xml new file mode 100644 index 000000000..f283575f0 --- /dev/null +++ b/res/xml/launcher_preferences.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2015 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> + + <SwitchPreference + android:key="pref_allowRotation" + android:title="@string/allow_rotation_title" + android:summary="@string/allow_rotation_summary" + android:defaultValue="@bool/allow_rotation" + android:persistent="true" + /> + +</PreferenceScreen> |