summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/CaptureUI.java
diff options
context:
space:
mode:
authorweijiew <weijiew@codeaurora.org>2016-12-15 14:45:48 +0800
committerweijiew <weijiew@codeaurora.org>2016-12-15 15:05:28 +0800
commit12ac236df386266adc05ac2e77cfe39a7d7e1214 (patch)
treee3e6180019b165d6f28f3af7e15727234b39243e /src/com/android/camera/CaptureUI.java
parent568dfe8fb8d7150e242ec778b039458d4e6e0b29 (diff)
downloadandroid_packages_apps_Snap-12ac236df386266adc05ac2e77cfe39a7d7e1214.tar.gz
android_packages_apps_Snap-12ac236df386266adc05ac2e77cfe39a7d7e1214.tar.bz2
android_packages_apps_Snap-12ac236df386266adc05ac2e77cfe39a7d7e1214.zip
SnapdragonCamera: Dialog display incompletely in landscape mode
Create a new layout for landscape mode CRs-Fixed: 1099373 Change-Id: Ie505c6ef8795e0b8a8b3424afde7cb46fc368136
Diffstat (limited to 'src/com/android/camera/CaptureUI.java')
-rw-r--r--src/com/android/camera/CaptureUI.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/com/android/camera/CaptureUI.java b/src/com/android/camera/CaptureUI.java
index aed62aaa9..9e71d782f 100644
--- a/src/com/android/camera/CaptureUI.java
+++ b/src/com/android/camera/CaptureUI.java
@@ -651,9 +651,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);
int index = mSettingsManager.getValueIndex(SettingsManager.KEY_SCENE_MODE);
TextView name = (TextView)view.findViewById(R.id.scene_mode_name);
@@ -724,12 +728,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() {