diff options
author | nicolasroard <nicolasroard@google.com> | 2012-10-24 11:38:24 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-10-24 11:38:25 -0700 |
commit | c50ba9db0366810bbe10e36ab61206ef51536ece (patch) | |
tree | 76c2b917db1a529069e6a785bd7a7506cc10b6f3 | |
parent | d62540b5ce2017d7f8045a648a1f04f7017891db (diff) | |
parent | b1eeb6ca05d1b1e59e64680b14c8d5b341e22582 (diff) | |
download | android_packages_apps_Snap-c50ba9db0366810bbe10e36ab61206ef51536ece.tar.gz android_packages_apps_Snap-c50ba9db0366810bbe10e36ab61206ef51536ece.tar.bz2 android_packages_apps_Snap-c50ba9db0366810bbe10e36ab61206ef51536ece.zip |
Merge "Save the image when applying tiny planet" into gb-ub-photos-arches
-rw-r--r-- | src/com/android/gallery3d/filtershow/FilterShowActivity.java | 4 | ||||
-rw-r--r-- | src/com/android/gallery3d/filtershow/PanelController.java | 12 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java index efcb2c3c3..0d197afee 100644 --- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java +++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java @@ -39,8 +39,8 @@ import android.view.Display; import android.view.Menu; import android.view.MenuItem; import android.view.View; -import android.view.WindowManager; import android.view.View.OnClickListener; +import android.view.WindowManager; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.ImageButton; @@ -234,6 +234,8 @@ public class FilterShowActivity extends Activity implements OnItemClickListener, mImageFlip.setImageLoader(mImageLoader); mImageFlip.setMaster(mImageShow); + mPanelController.setActivity(this); + mPanelController.addImageView(findViewById(R.id.imageShow)); mPanelController.addImageView(findViewById(R.id.imageCurves)); mPanelController.addImageView(findViewById(R.id.imageBorder)); diff --git a/src/com/android/gallery3d/filtershow/PanelController.java b/src/com/android/gallery3d/filtershow/PanelController.java index 8f1bdb416..9f5f2656a 100644 --- a/src/com/android/gallery3d/filtershow/PanelController.java +++ b/src/com/android/gallery3d/filtershow/PanelController.java @@ -44,7 +44,6 @@ import com.android.gallery3d.filtershow.imageshow.ImageCrop; import com.android.gallery3d.filtershow.imageshow.ImageShow; import com.android.gallery3d.filtershow.presets.ImagePreset; import com.android.gallery3d.filtershow.ui.FramedTextButton; -import com.android.gallery3d.filtershow.ui.ImageButtonTitle; import com.android.gallery3d.filtershow.ui.ImageCurves; import java.util.HashMap; @@ -288,6 +287,11 @@ public class PanelController implements OnClickListener { private UtilityPanel mUtilityPanel = null; private ImageShow mMasterImage = null; private ImageShow mCurrentImage = null; + private FilterShowActivity mActivity = null; + + public void setActivity(FilterShowActivity activity) { + mActivity = activity; + } public void addView(View view) { view.setOnClickListener(this); @@ -696,7 +700,11 @@ public class PanelController implements OnClickListener { break; } case R.id.applyEffect: { - showPanel(mCurrentPanel); + if (mMasterImage.getCurrentFilter() instanceof ImageFilterTinyPlanet) { + mActivity.saveImage(); + } else { + showPanel(mCurrentPanel); + } break; } } |