summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/CaptureModule.java
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2016-11-09 00:08:42 -0800
committerSteve Kondik <steve@cyngn.com>2016-11-13 23:33:36 -0800
commit4538ee80f8a9eb338281db00fb349e111eeb5aaf (patch)
treebb81593e683955db458c96b6b5fb0fdf71b314ae /src/com/android/camera/CaptureModule.java
parent0b4b53688f8486537d9d58dc6448ca2db8c67c7d (diff)
downloadandroid_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/CaptureModule.java')
-rw-r--r--src/com/android/camera/CaptureModule.java20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 09ee0b595..7a81854fb 100644
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -71,6 +71,7 @@ import android.view.OrientationEventListener;
import android.view.Surface;
import android.view.SurfaceHolder;
import android.view.View;
+import android.view.ViewGroup;
import android.widget.Toast;
import com.android.camera.exif.ExifInterface;
@@ -957,7 +958,7 @@ public class CaptureModule implements CameraModule, PhotoController,
setCurrentMode();
mContentResolver = mActivity.getContentResolver();
- mUI = new CaptureUI(activity, this, parent);
+ mUI = new CaptureUI(activity, this, (ViewGroup) parent);
mUI.initializeControlByIntent();
mFocusStateListener = new FocusStateListener(mUI);
@@ -1172,14 +1173,6 @@ public class CaptureModule implements CameraModule, PhotoController,
CaptureRequest request,
TotalCaptureResult result) {
Log.d(TAG, "captureStillPicture Longshot onCaptureCompleted: " + id);
- if (mLongshotActive) {
- mActivity.runOnUiThread(new Runnable() {
- @Override
- public void run() {
- mUI.doShutterAnimation();
- }
- });
- }
}
@Override
@@ -1187,14 +1180,6 @@ public class CaptureModule implements CameraModule, PhotoController,
CaptureRequest request,
CaptureFailure result) {
Log.d(TAG, "captureStillPicture Longshot onCaptureFailed: " + id);
- if (mLongshotActive) {
- mActivity.runOnUiThread(new Runnable() {
- @Override
- public void run() {
- mUI.doShutterAnimation();
- }
- });
- }
}
@Override
@@ -1849,7 +1834,6 @@ public class CaptureModule implements CameraModule, PhotoController,
initializeValues();
updatePreviewSize();
mUI.showSurfaceView();
- mUI.setSwitcherIndex();
mCameraIdList = new ArrayList<>();
if (mSound == null) {