diff options
author | Steve Kondik <steve@cyngn.com> | 2016-11-09 00:08:42 -0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2016-11-13 23:33:36 -0800 |
commit | 4538ee80f8a9eb338281db00fb349e111eeb5aaf (patch) | |
tree | bb81593e683955db458c96b6b5fb0fdf71b314ae /src/com/android/camera/WideAnglePanoramaModule.java | |
parent | 0b4b53688f8486537d9d58dc6448ca2db8c67c7d (diff) | |
download | android_packages_apps_Snap-4538ee80f8a9eb338281db00fb349e111eeb5aaf.tar.gz android_packages_apps_Snap-4538ee80f8a9eb338281db00fb349e111eeb5aaf.tar.bz2 android_packages_apps_Snap-4538ee80f8a9eb338281db00fb349e111eeb5aaf.zip |
snap: UX improvements v1
* Make the camera controls do sane things- get rid of the
manual placement of every widget and use layouts
* Animate everything correctly
* Show ripples when clicking the shutter
* Clean up a metric ton of dead code
* Moved more code into BaseUI
* Make setting up the camera controls less verbose and magical
* Fixed up panorama layout
Change-Id: Iaed44ca0201a2e2641e1c2460d3ff9ec3eae2d85
Diffstat (limited to 'src/com/android/camera/WideAnglePanoramaModule.java')
-rw-r--r-- | src/com/android/camera/WideAnglePanoramaModule.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/com/android/camera/WideAnglePanoramaModule.java b/src/com/android/camera/WideAnglePanoramaModule.java index de2667034..9b712c6bf 100644 --- a/src/com/android/camera/WideAnglePanoramaModule.java +++ b/src/com/android/camera/WideAnglePanoramaModule.java @@ -45,7 +45,7 @@ import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import android.widget.Toast; -import com.android.camera.PhotoModule; + import com.android.camera.CameraManager.CameraProxy; import com.android.camera.app.OrientationManager; import com.android.camera.data.LocalData; @@ -53,6 +53,7 @@ import com.android.camera.exif.ExifInterface; import com.android.camera.ui.RotateTextToast; import com.android.camera.util.CameraUtil; import com.android.camera.util.UsageStatistics; + import org.codeaurora.snapcam.R; import java.io.ByteArrayOutputStream; @@ -70,7 +71,7 @@ public class WideAnglePanoramaModule public static final int DEFAULT_SWEEP_ANGLE = 160; public static final int DEFAULT_BLEND_MODE = Mosaic.BLENDTYPE_HORIZONTAL; - public static final int DEFAULT_CAPTURE_PIXELS = 960 * 720; + public static final int DEFAULT_CAPTURE_PIXELS = 1440 * 1080; private static final int MSG_LOW_RES_FINAL_MOSAIC_READY = 1; private static final int MSG_GENERATE_FINAL_MOSAIC_ERROR = 2; @@ -430,7 +431,7 @@ public class WideAnglePanoramaModule int w = size.width; // we only want 4:3 format. int d = DEFAULT_CAPTURE_PIXELS - h * w; - if (needSmaller && d < 0) { // no bigger preview than 960x720. + if (needSmaller && d < 0) { continue; } if (need4To3 && (h * 4 != w * 3)) { @@ -459,6 +460,7 @@ public class WideAnglePanoramaModule Log.d(TAG, "camera preview h = " + mCameraPreviewHeight + " , w = " + mCameraPreviewWidth); parameters.setPreviewSize(mCameraPreviewWidth, mCameraPreviewHeight); + mUI.setPreviewSize(mCameraPreviewWidth, mCameraPreviewHeight); List<int[]> frameRates = parameters.getSupportedPreviewFpsRange(); int last = frameRates.size() - 1; @@ -1161,10 +1163,6 @@ public class WideAnglePanoramaModule // If panorama is generating low res or high res mosaic, ignore back // key. So the activity will not be destroyed. if (mThreadRunning) return true; - - if (mUI.hideSwitcherPopup()) - return true; - return false; } |