diff options
author | nicolasroard <nicolasroard@google.com> | 2012-10-18 15:37:50 -0700 |
---|---|---|
committer | nicolasroard <nicolasroard@google.com> | 2012-10-18 15:43:18 -0700 |
commit | 51c30125189936313604d1111becef8565e76120 (patch) | |
tree | 223a331db6bfbaaee069d2c217d5e63bef678aac | |
parent | 079ee7776fb81d1f38ea22bf553d2c7c9ba45103 (diff) | |
download | android_packages_apps_Snap-51c30125189936313604d1111becef8565e76120.tar.gz android_packages_apps_Snap-51c30125189936313604d1111becef8565e76120.tar.bz2 android_packages_apps_Snap-51c30125189936313604d1111becef8565e76120.zip |
Hide curve channel picker
bug:7375053
Change-Id: I7aa5f9db44dc657b0f4282a1bb2ea41bde322d36
-rw-r--r-- | src/com/android/gallery3d/filtershow/FilterShowActivity.java | 3 | ||||
-rw-r--r-- | src/com/android/gallery3d/filtershow/PanelController.java | 27 |
2 files changed, 23 insertions, 7 deletions
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java index 02551ee4d..98f977dd7 100644 --- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java +++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java @@ -342,7 +342,8 @@ public class FilterShowActivity extends Activity implements OnItemClickListener, mImageZoom.setSeekBar(seekBar); mPanelController.setRowPanel(findViewById(R.id.secondRowPanel)); mPanelController.setUtilityPanel(this, findViewById(R.id.filterButtonsList), - findViewById(R.id.applyEffect), findViewById(R.id.aspect)); + findViewById(R.id.applyEffect), findViewById(R.id.aspect), + findViewById(R.id.pickCurvesChannel)); mPanelController.setMasterImage(mImageShow); mPanelController.setCurrentPanel(mFxButton); Intent intent = getIntent(); diff --git a/src/com/android/gallery3d/filtershow/PanelController.java b/src/com/android/gallery3d/filtershow/PanelController.java index 6c28fce57..90006dccb 100644 --- a/src/com/android/gallery3d/filtershow/PanelController.java +++ b/src/com/android/gallery3d/filtershow/PanelController.java @@ -17,15 +17,14 @@ import com.android.gallery3d.filtershow.filters.ImageFilterRedEye; import com.android.gallery3d.filtershow.filters.ImageFilterSaturated; import com.android.gallery3d.filtershow.filters.ImageFilterShadows; import com.android.gallery3d.filtershow.filters.ImageFilterSharpen; -import com.android.gallery3d.filtershow.filters.ImageFilterTinyPlanet; import com.android.gallery3d.filtershow.filters.ImageFilterVibrance; import com.android.gallery3d.filtershow.filters.ImageFilterVignette; import com.android.gallery3d.filtershow.filters.ImageFilterWBalance; 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.ImageCurves; import com.android.gallery3d.filtershow.ui.ImageButtonTitle; +import com.android.gallery3d.filtershow.ui.ImageCurves; import java.util.HashMap; import java.util.Vector; @@ -117,6 +116,7 @@ public class PanelController implements OnClickListener { private int mParameterValue = 0; private boolean mShowParameterValue = false; private View mAspectButton = null; + private View mCurvesButton = null; private int mCurrentAspectButton = 0; private static final int NUMBER_OF_ASPECT_BUTTONS = 6; private static final int ASPECT_NONE = 0; @@ -126,11 +126,13 @@ public class PanelController implements OnClickListener { private static final int ASPECT_16TO9 = 4; private static final int ASPECT_ORIG = 5; - public UtilityPanel(Context context, View view, View textView, View button) { + public UtilityPanel(Context context, View view, View textView, + View aspectButton, View curvesButton) { mContext = context; mView = view; mTextView = (TextView) textView; - mAspectButton = button; + mAspectButton = aspectButton; + mCurvesButton = curvesButton; } public boolean selected() { @@ -210,6 +212,16 @@ public class PanelController implements OnClickListener { mAspectButton.setVisibility(View.GONE); } + public void showCurvesButtons() { + if (mCurvesButton != null) + mCurvesButton.setVisibility(View.VISIBLE); + } + + public void hideCurvesButtons() { + if (mCurvesButton != null) + mCurvesButton.setVisibility(View.GONE); + } + public void onNewValue(int value) { mParameterValue = value; updateText(); @@ -346,8 +358,9 @@ public class PanelController implements OnClickListener { } public void setUtilityPanel(Context context, View utilityPanel, View textView, - View button) { - mUtilityPanel = new UtilityPanel(context, utilityPanel, textView, button); + View aspectButton, View curvesButton) { + mUtilityPanel = new UtilityPanel(context, utilityPanel, textView, + aspectButton, curvesButton); } public void setMasterImage(ImageShow imageShow) { @@ -505,6 +518,7 @@ public class PanelController implements OnClickListener { mCurrentImage.unselect(); } mUtilityPanel.hideAspectButtons(); + mUtilityPanel.hideCurvesButtons(); switch (view.getId()) { case R.id.tinyplanetButton: { mCurrentImage = showImageView(R.id.imageShow).setShowControls(true); @@ -554,6 +568,7 @@ public class PanelController implements OnClickListener { String ename = curves.getContext().getString(R.string.curvesRGB); mUtilityPanel.setEffectName(ename); mUtilityPanel.setShowParameter(false); + mUtilityPanel.showCurvesButtons(); curves.reloadCurve(); mCurrentImage = curves; break; |