summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/ui/ControlPanelLayout.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/camera/ui/ControlPanelLayout.java b/src/com/android/camera/ui/ControlPanelLayout.java
index 24efb8b..c3ae9c0 100644
--- a/src/com/android/camera/ui/ControlPanelLayout.java
+++ b/src/com/android/camera/ui/ControlPanelLayout.java
@@ -66,7 +66,13 @@ public class ControlPanelLayout extends RelativeLayout {
Log.e(TAG, "layout_xxx of ControlPanelLayout should be wrap_content");
}
- // The width cannot be bigger than the constraint.
+ // The size cannot be smaller than minimum constraint.
+ int minimumSize = (isLandscape) ? getMinimumWidth() : getMinimumHeight();
+ if (measuredSize < minimumSize) {
+ measuredSize = minimumSize;
+ }
+
+ // The size cannot be bigger than the constraint.
if (mode == MeasureSpec.AT_MOST && measuredSize > specSize) {
measuredSize = specSize;
}