summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorakahuang <akahuang@google.com>2012-04-18 11:28:01 +0800
committerEino-Ville Talvala <etalvala@google.com>2012-06-15 13:39:00 -0700
commita96fbc672886ddac5169a7e8ddbfecf535770669 (patch)
treea5ff40a55dc238f6475252f15c10500a5ce0f3b6 /src
parent14f75622cf4b651089594d155a9c6a0000c51b17 (diff)
downloadLegacyCamera-a96fbc672886ddac5169a7e8ddbfecf535770669.zip
LegacyCamera-a96fbc672886ddac5169a7e8ddbfecf535770669.tar.gz
LegacyCamera-a96fbc672886ddac5169a7e8ddbfecf535770669.tar.bz2
Fix camera_control distorted in small resolution.
Use minimum height of camera_control to fix it. bug:6228273 Change-Id: I7c623efe06e043664d696f753f08877cd34450a1
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;
}