From a96fbc672886ddac5169a7e8ddbfecf535770669 Mon Sep 17 00:00:00 2001 From: akahuang Date: Wed, 18 Apr 2012 11:28:01 +0800 Subject: Fix camera_control distorted in small resolution. Use minimum height of camera_control to fix it. bug:6228273 Change-Id: I7c623efe06e043664d696f753f08877cd34450a1 --- src/com/android/camera/ui/ControlPanelLayout.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.1