diff options
author | Camera Software Integration <camswint@localhost> | 2016-12-22 22:55:38 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-12-22 22:55:38 -0800 |
commit | 53e1bd77af1c1c0e203d536c0e52ce9e03316a65 (patch) | |
tree | 3d099009d18b6ca3b3e567e725a2f8023168d89b /src/com/android | |
parent | e305c4768a9c7c030fa5bb935b0776d80a1e1ebd (diff) | |
parent | 12ac236df386266adc05ac2e77cfe39a7d7e1214 (diff) | |
download | android_packages_apps_Snap-53e1bd77af1c1c0e203d536c0e52ce9e03316a65.tar.gz android_packages_apps_Snap-53e1bd77af1c1c0e203d536c0e52ce9e03316a65.tar.bz2 android_packages_apps_Snap-53e1bd77af1c1c0e203d536c0e52ce9e03316a65.zip |
Merge "SnapdragonCamera: Dialog display incompletely in landscape mode" into camera.lnx.1.0-dev.1.0
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/camera/CaptureUI.java | 15 | ||||
-rw-r--r-- | src/com/android/camera/PanoCaptureUI.java | 15 |
2 files changed, 16 insertions, 14 deletions
diff --git a/src/com/android/camera/CaptureUI.java b/src/com/android/camera/CaptureUI.java index 1bb20e9f7..1cb7d7510 100644 --- a/src/com/android/camera/CaptureUI.java +++ b/src/com/android/camera/CaptureUI.java @@ -655,9 +655,13 @@ public class CaptureUI implements FocusOverlayManager.FocusUI, } private void showSceneInstructionalDialog(int orientation) { + int layoutId = R.layout.scene_mode_instructional; + if ( orientation == 90 || orientation == 270 ) { + layoutId = R.layout.scene_mode_instructional_landscape; + } LayoutInflater inflater = (LayoutInflater)mActivity.getSystemService(Context.LAYOUT_INFLATER_SERVICE); - View view = inflater.inflate(R.layout.scene_mode_instructional, null); + View view = inflater.inflate(layoutId, null); final int index = mSettingsManager.getValueIndex(SettingsManager.KEY_SCENE_MODE); TextView name = (TextView)view.findViewById(R.id.scene_mode_name); @@ -728,12 +732,9 @@ public class CaptureUI implements FocusOverlayManager.FocusUI, dialogWindow.setGravity(Gravity.CENTER); lp.width = lp.height = dialogSize; dialogWindow.setAttributes(lp); - if ( orientation == 180 ) { - dialogSize -= 40; - RelativeLayout layout = (RelativeLayout)view.findViewById(R.id.mode_layout_rect); - FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(dialogSize, dialogSize); - layout.setLayoutParams(params); - } + RelativeLayout layout = (RelativeLayout)view.findViewById(R.id.mode_layout_rect); + FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(dialogSize, dialogSize); + layout.setLayoutParams(params); } private void showSceneModeLabel() { diff --git a/src/com/android/camera/PanoCaptureUI.java b/src/com/android/camera/PanoCaptureUI.java index 5e9692908..a25ff9f94 100644 --- a/src/com/android/camera/PanoCaptureUI.java +++ b/src/com/android/camera/PanoCaptureUI.java @@ -455,9 +455,13 @@ public class PanoCaptureUI implements } private void showSceneInstructionalDialog(int orientation) { + int layoutId = R.layout.scene_mode_instructional; + if ( orientation == 90 || orientation == 270 ) { + layoutId = R.layout.scene_mode_instructional_landscape; + } LayoutInflater inflater = (LayoutInflater)mActivity.getSystemService(Context.LAYOUT_INFLATER_SERVICE); - View view = inflater.inflate(R.layout.scene_mode_instructional, null); + View view = inflater.inflate(layoutId, null); TextView name = (TextView)view.findViewById(R.id.scene_mode_name); name.setText(R.string.pref_camera_scenemode_entry_panorama); @@ -516,11 +520,8 @@ public class PanoCaptureUI implements dialogWindow.setGravity(Gravity.CENTER); lp.width = lp.height = dialogSize; dialogWindow.setAttributes(lp); - if ( orientation == 180 ) { - dialogSize -= 40; - RelativeLayout layout = (RelativeLayout)view.findViewById(R.id.mode_layout_rect); - FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(dialogSize, dialogSize); - layout.setLayoutParams(params); - } + RelativeLayout layout = (RelativeLayout)view.findViewById(R.id.mode_layout_rect); + FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(dialogSize, dialogSize); + layout.setLayoutParams(params); } } |