diff options
author | Danesh Mondegarian <daneshm90@gmail.com> | 2013-05-14 17:14:21 -0400 |
---|---|---|
committer | Danesh Mondegarian <daneshm90@gmail.com> | 2013-05-20 12:18:40 -0400 |
commit | bbbc8f7f16120b9886cd6c63b007fd58e1a2a645 (patch) | |
tree | f0c342ad1758fbc9d64825d9553862d6564c7e48 /src/com/android/settings/cyanogenmod | |
parent | 701558adb7392b96d2b28eea1f94410c90bfe85f (diff) | |
download | packages_apps_settings-bbbc8f7f16120b9886cd6c63b007fd58e1a2a645.zip packages_apps_settings-bbbc8f7f16120b9886cd6c63b007fd58e1a2a645.tar.gz packages_apps_settings-bbbc8f7f16120b9886cd6c63b007fd58e1a2a645.tar.bz2 |
Navbar : Lock current orientation in edit mode
Freeze current orientation during edit mode.
Jira : https://jira.cyanogenmod.org/browse/CYAN-1117
Change-Id: I61a852855b70011291a242f3068f67336ba61131
Diffstat (limited to 'src/com/android/settings/cyanogenmod')
-rw-r--r-- | src/com/android/settings/cyanogenmod/NavBar.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/settings/cyanogenmod/NavBar.java b/src/com/android/settings/cyanogenmod/NavBar.java index 9fc56af..b26d7fa 100644 --- a/src/com/android/settings/cyanogenmod/NavBar.java +++ b/src/com/android/settings/cyanogenmod/NavBar.java @@ -50,7 +50,6 @@ public class NavBar extends Fragment { public void onAttach(Activity activity) { super.onAttach(activity); mActivity = activity; - mActivity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); } @Override @@ -148,5 +147,10 @@ public class NavBar extends Fragment { mEditMenu.setTitle(on ? R.string.navigation_bar_menu_editable : R.string.navigation_bar_menu_locked) .setIcon(on ? R.drawable.stat_navbar_edit_on : R.drawable.stat_navbar_edit_off); } + if (on) { + Utils.lockCurrentOrientation(mActivity); + } else { + mActivity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED); + } } } |