summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Sears <bsears@google.com>2012-12-18 12:58:15 -0800
committerBart Sears <bsears@google.com>2012-12-18 12:58:15 -0800
commit97cb71043e8dc15948c7dc663504966ff988c4d1 (patch)
tree809e319f07846567e26fa487723c5ee230c0f819
parent04359d5ddb1c69da3671ca285553d51b846c4fe2 (diff)
parent2b5021d525229c759f0b57b8a607520d081a3084 (diff)
downloadandroid_packages_apps_Snap-97cb71043e8dc15948c7dc663504966ff988c4d1.zip
android_packages_apps_Snap-97cb71043e8dc15948c7dc663504966ff988c4d1.tar.gz
android_packages_apps_Snap-97cb71043e8dc15948c7dc663504966ff988c4d1.tar.bz2
resolved conflicts for merge of 5b188c94 to gb-ub-photos-bryce
Change-Id: I0b39e54323c8f2ce67816ec223acf72cfacbd191
-rw-r--r--src/com/android/gallery3d/filtershow/FilterShowActivity.java23
-rw-r--r--src/com/android/gallery3d/filtershow/PanelController.java14
2 files changed, 36 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
index 079e5b1..4198da0 100644
--- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java
+++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
@@ -254,6 +254,11 @@ public class FilterShowActivity extends Activity implements OnItemClickListener,
mGeometryButton = (ImageButton) findViewById(R.id.geometryButton);
mColorsButton = (ImageButton) findViewById(R.id.colorsButton);
+ mBottomPanelButtons.add(mFxButton);
+ mBottomPanelButtons.add(mBorderButton);
+ mBottomPanelButtons.add(mGeometryButton);
+ mBottomPanelButtons.add(mColorsButton);
+
mImageShow.setImageLoader(mImageLoader);
mImageCurves.setImageLoader(mImageLoader);
mImageCurves.setMaster(mImageShow);
@@ -823,6 +828,22 @@ public class FilterShowActivity extends Activity implements OnItemClickListener,
}
}
+ public void disableFilterButtons() {
+ for (ImageButton b : mBottomPanelButtons) {
+ b.setEnabled(false);
+ b.setClickable(false);
+ b.setAlpha(0.4f);
+ }
+ }
+
+ public void enableFilterButtons() {
+ for (ImageButton b : mBottomPanelButtons) {
+ b.setEnabled(true);
+ b.setClickable(true);
+ b.setAlpha(1.0f);
+ }
+ }
+
// //////////////////////////////////////////////////////////////////////////////
// imageState panel...
@@ -904,7 +925,7 @@ public class FilterShowActivity extends Activity implements OnItemClickListener,
invalidateOptionsMenu();
}
- private void resetHistory() {
+ void resetHistory() {
mNullFxFilter.onClick(mNullFxFilter);
mNullBorderFilter.onClick(mNullBorderFilter);
diff --git a/src/com/android/gallery3d/filtershow/PanelController.java b/src/com/android/gallery3d/filtershow/PanelController.java
index 41833a6..94259e9 100644
--- a/src/com/android/gallery3d/filtershow/PanelController.java
+++ b/src/com/android/gallery3d/filtershow/PanelController.java
@@ -58,6 +58,7 @@ public class PanelController implements OnClickListener {
private static int HORIZONTAL_MOVE = 1;
private static final int ANIM_DURATION = 200;
private static final String LOGTAG = "PanelController";
+ private boolean mDisableFilterButtons = false;
private boolean mFixedAspect = false;
public void setFixedAspect(boolean t) {
@@ -357,6 +358,10 @@ public class PanelController implements OnClickListener {
mCurrentImage.resetParameter();
mCurrentImage.select();
}
+ if (mDisableFilterButtons) {
+ mActivity.enableFilterButtons();
+ mDisableFilterButtons = false;
+ }
}
public boolean onBackPressed() {
@@ -368,6 +373,11 @@ public class PanelController implements OnClickListener {
mMasterImage.onItemClick(position);
showPanel(mCurrentPanel);
mCurrentImage.select();
+ if (mDisableFilterButtons) {
+ mActivity.enableFilterButtons();
+ mActivity.resetHistory();
+ mDisableFilterButtons = false;
+ }
return false;
}
@@ -587,6 +597,10 @@ public class PanelController implements OnClickListener {
String ename = mCurrentImage.getContext().getString(R.string.tinyplanet);
mUtilityPanel.setEffectName(ename);
ensureFilter(ename);
+ if (!mDisableFilterButtons) {
+ mActivity.disableFilterButtons();
+ mDisableFilterButtons = true;
+ }
break;
}
case R.id.straightenButton: {