diff options
| author | nicolasroard <nicolasroard@google.com> | 2012-10-18 15:45:56 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-10-18 15:45:56 -0700 |
| commit | 4aad8963b583d812d61cbaa920b914876c5fa7d2 (patch) | |
| tree | 99b0ea5255804d45ed47d2eae4980e3836452138 | |
| parent | 0136dc75dc4069ca36c077a8a078db64f0fc35c6 (diff) | |
| parent | 33e58a68ee1d4866169d41b7d88c6eff0c70dae0 (diff) | |
| download | android_packages_apps_Gallery2-4aad8963b583d812d61cbaa920b914876c5fa7d2.tar.gz android_packages_apps_Gallery2-4aad8963b583d812d61cbaa920b914876c5fa7d2.tar.bz2 android_packages_apps_Gallery2-4aad8963b583d812d61cbaa920b914876c5fa7d2.zip | |
Merge "Hide curve channel picker" into gb-ub-photos-arches
| -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; |
