diff options
author | Angus Kong <shkong@google.com> | 2011-08-22 12:27:21 +0800 |
---|---|---|
committer | Angus Kong <shkong@google.com> | 2011-08-25 11:37:03 +0800 |
commit | a907c122ccec649c6cedf3a45b1c426a5fca932e (patch) | |
tree | a9ee81ace05282d5e5661404085becd3e3393190 /src/com/android/camera/Camera.java | |
parent | 50b3c890986aadb3780b4da8c0b8dbb0f1422eba (diff) | |
download | LegacyCamera-a907c122ccec649c6cedf3a45b1c426a5fca932e.zip LegacyCamera-a907c122ccec649c6cedf3a45b1c426a5fca932e.tar.gz LegacyCamera-a907c122ccec649c6cedf3a45b1c426a5fca932e.tar.bz2 |
Add thumbnail and share popup for the last result.
bug:5141665
Change-Id: Idc44d33d09c8d4a30fdcef66de2d6754daf1ea82
Diffstat (limited to 'src/com/android/camera/Camera.java')
-rw-r--r-- | src/com/android/camera/Camera.java | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index 1270367..6d77b2a 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -90,11 +90,10 @@ import java.util.Formatter; import java.util.List; /** The Camera activity which can preview and take pictures. */ -public class Camera extends ActivityBase implements View.OnClickListener, +public class Camera extends ActivityBase implements FocusManager.Listener, View.OnTouchListener, ShutterButton.OnShutterButtonListener, SurfaceHolder.Callback, ModePicker.OnModeChangeListener, - FaceDetectionListener, CameraPreference.OnPreferenceChangedListener, - FocusManager.Listener { + FaceDetectionListener, CameraPreference.OnPreferenceChangedListener { private static final String TAG = "camera"; @@ -419,7 +418,6 @@ public class Camera extends ActivityBase implements View.OnClickListener, } private void initThumbnailButton() { - mThumbnailView.setOnClickListener(this); // Load the thumbnail from the disk. mThumbnail = Thumbnail.loadFrom(new File(getFilesDir(), LAST_THUMB_FILENAME)); updateThumbnailButton(); @@ -1038,9 +1036,6 @@ public class Camera extends ActivityBase implements View.OnClickListener, setupCaptureParams(); findViewById(R.id.review_control).setVisibility(View.VISIBLE); - findViewById(R.id.btn_cancel).setOnClickListener(this); - findViewById(R.id.btn_retake).setOnClickListener(this); - findViewById(R.id.btn_done).setOnClickListener(this); } else { mModePicker = (ModePicker) findViewById(R.id.mode_picker); mModePicker.setVisibility(View.VISIBLE); @@ -1201,27 +1196,29 @@ public class Camera extends ActivityBase implements View.OnClickListener, updateStorageHint(); } - @Override - public void onClick(View v) { - switch (v.getId()) { - case R.id.thumbnail: - if (isCameraIdle() && mThumbnail != null) { - showSharePopup(); - } - break; - case R.id.btn_retake: - hidePostCaptureAlert(); - startPreview(); - break; - case R.id.btn_done: - doAttach(); - break; - case R.id.btn_cancel: - doCancel(); - break; + @OnClickAttr + public void onThumbnailClicked(View v) { + if (isCameraIdle() && mThumbnail != null) { + showSharePopup(); } } + @OnClickAttr + public void onRetakeButtonClicked(View v) { + hidePostCaptureAlert(); + startPreview(); + } + + @OnClickAttr + public void onDoneButtonClicked(View v) { + doAttach(); + } + + @OnClickAttr + public void onCancelButtonClicked(View v) { + doCancel(); + } + private void doAttach() { if (mPausing) { return; |