diff options
author | Hung-ying Tyan <tyanh@google.com> | 2010-11-09 17:23:29 +0800 |
---|---|---|
committer | Hung-ying Tyan <tyanh@google.com> | 2010-11-09 17:28:40 +0800 |
commit | ec689e833e5730517d190a136710186a8f0c1445 (patch) | |
tree | 9fb3d45ce21572452a7ab5d05538554cd2c4d682 /src/com/android/camera/PreviewFrameLayout.java | |
parent | 6897561d02003e59c038f1dc4d4669e3723e9cad (diff) | |
download | LegacyCamera-ec689e833e5730517d190a136710186a8f0c1445.zip LegacyCamera-ec689e833e5730517d190a136710186a8f0c1445.tar.gz LegacyCamera-ec689e833e5730517d190a136710186a8f0c1445.tar.bz2 |
Add new layout file for camera.
+ Copied the layout file from res/layout and put it in res/layout-xlarge.
+ Changed FrameLayout to RelativeLayout in the new layout file.
+ Replace FrameLayout with View/ViewGroup in the code as it's not layout specific.
Bug: 3156684 (in progress)
Change-Id: Ife35528c08bc0e35793a0ff645ec9a7260c842c1
Diffstat (limited to 'src/com/android/camera/PreviewFrameLayout.java')
-rw-r--r-- | src/com/android/camera/PreviewFrameLayout.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/camera/PreviewFrameLayout.java b/src/com/android/camera/PreviewFrameLayout.java index 1ec629f..f60c93b 100644 --- a/src/com/android/camera/PreviewFrameLayout.java +++ b/src/com/android/camera/PreviewFrameLayout.java @@ -20,8 +20,8 @@ import android.app.Activity; import android.content.Context; import android.util.AttributeSet; import android.util.DisplayMetrics; +import android.view.View; import android.view.ViewGroup; -import android.widget.FrameLayout; /** * A layout which handles the preview aspect ratio and the position of @@ -36,7 +36,7 @@ public class PreviewFrameLayout extends ViewGroup { } private double mAspectRatio = 4.0 / 3.0; - private FrameLayout mFrame; + private View mFrame; private OnSizeChangedListener mSizeListener; private final DisplayMetrics mMetrics = new DisplayMetrics(); @@ -52,7 +52,7 @@ public class PreviewFrameLayout extends ViewGroup { @Override protected void onFinishInflate() { - mFrame = (FrameLayout) findViewById(R.id.frame); + mFrame = (View) findViewById(R.id.frame); if (mFrame == null) { throw new IllegalStateException( "must provide child with id as \"frame\""); @@ -73,7 +73,7 @@ public class PreviewFrameLayout extends ViewGroup { int frameWidth = getWidth(); int frameHeight = getHeight(); - FrameLayout f = mFrame; + View f = mFrame; int horizontalPadding = f.getPaddingLeft() + f.getPaddingRight(); int verticalPadding = f.getPaddingBottom() + f.getPaddingTop(); int previewHeight = frameHeight - verticalPadding; |