diff options
author | Hung-ying Tyan <tyanh@google.com> | 2010-11-25 13:06:34 +0800 |
---|---|---|
committer | Hung-ying Tyan <tyanh@google.com> | 2010-11-26 22:50:28 +0800 |
commit | 41ac285a1c97b1df78246456effb80de51033323 (patch) | |
tree | 24d8eb2fefe3f809abafed12ac01be9a7a3cd952 /src/com/android/camera/PreviewFrameLayout.java | |
parent | 048f1818ab5bff5ba97ea416a5166890c812ac1b (diff) | |
download | packages_apps_LegacyCamera-41ac285a1c97b1df78246456effb80de51033323.zip packages_apps_LegacyCamera-41ac285a1c97b1df78246456effb80de51033323.tar.gz packages_apps_LegacyCamera-41ac285a1c97b1df78246456effb80de51033323.tar.bz2 |
Increase camera preview frame size and other changes.
+ Increase camera preview frame size and align it to the left of the screen.
+ Move thumbnail to the lower left corner of the preview frame.
+ Move GPS indicator to the lower right corner of the preview frame.
+ Replace LinearLayout and negative margin with RelativeLayout.
+ Revise the look of the settings wheel based on new UI mock.
+ Add border to preview frame.
+ Make settings popup windows align with an invisible view in the root view.
This makes it easier to adjust the location of the popup windows.
Bug: 3156693
Change-Id: I8843fec803f8418699df7e425ea74af708b4ea99
Diffstat (limited to 'src/com/android/camera/PreviewFrameLayout.java')
-rw-r--r-- | src/com/android/camera/PreviewFrameLayout.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/com/android/camera/PreviewFrameLayout.java b/src/com/android/camera/PreviewFrameLayout.java index 4ceb58c..982e088 100644 --- a/src/com/android/camera/PreviewFrameLayout.java +++ b/src/com/android/camera/PreviewFrameLayout.java @@ -38,6 +38,7 @@ public class PreviewFrameLayout extends RelativeLayout { private double mAspectRatio = 4.0 / 3.0; private View mFrame; + private View mBorderView; private RadioGroup mCameraPicker; private OnSizeChangedListener mSizeListener; private final DisplayMetrics mMetrics = new DisplayMetrics(); @@ -61,6 +62,14 @@ public class PreviewFrameLayout extends RelativeLayout { "must provide child with id as \"frame\""); } mCameraPicker = (RadioGroup) findViewById(R.id.camera_picker); + + View preview = (View) findViewById(R.id.camera_preview); + ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) + preview.getLayoutParams(); + mBorderView = (View) findViewById(R.id.preview_border); + View f = mBorderView; + params.setMargins(f.getPaddingLeft(), f.getPaddingTop(), f.getPaddingRight(), f.getPaddingBottom()); + preview.setLayoutParams(params); } public void setAspectRatio(double ratio) { @@ -77,7 +86,7 @@ public class PreviewFrameLayout extends RelativeLayout { int frameWidth = getWidth(); int frameHeight = getHeight(); - View f = mFrame; + View f = mBorderView; int horizontalPadding = f.getPaddingLeft() + f.getPaddingRight(); int verticalPadding = f.getPaddingBottom() + f.getPaddingTop(); int previewHeight = frameHeight - verticalPadding; |