summaryrefslogtreecommitdiffstats
path: root/src/com/cyngn
diff options
context:
space:
mode:
authorClark Scheff <clark@cyngn.com>2014-11-11 09:18:09 -0800
committerClark Scheff <clark@cyngn.com>2014-11-11 18:30:58 +0000
commit6224f1e816afb491d7700b2da3a461b379f7532d (patch)
tree21e5461203def6ab03033b00d25bee21debfe071 /src/com/cyngn
parenta533da10c37c3a2e95b9937850a6e3882eaa3890 (diff)
downloadpackages_apps_ThemeChooser-6224f1e816afb491d7700b2da3a461b379f7532d.zip
packages_apps_ThemeChooser-6224f1e816afb491d7700b2da3a461b379f7532d.tar.gz
packages_apps_ThemeChooser-6224f1e816afb491d7700b2da3a461b379f7532d.tar.bz2
Disable action buttons when showing an overlay
Change-Id: Ib04be04925f6528ef8bba824fa6f01ab88acff0e REF: THEMES-413
Diffstat (limited to 'src/com/cyngn')
-rw-r--r--src/com/cyngn/theme/chooser/MyThemeFragment.java2
-rw-r--r--src/com/cyngn/theme/chooser/ThemeFragment.java26
2 files changed, 28 insertions, 0 deletions
diff --git a/src/com/cyngn/theme/chooser/MyThemeFragment.java b/src/com/cyngn/theme/chooser/MyThemeFragment.java
index 6d9f695..54cedb7 100644
--- a/src/com/cyngn/theme/chooser/MyThemeFragment.java
+++ b/src/com/cyngn/theme/chooser/MyThemeFragment.java
@@ -165,6 +165,8 @@ public class MyThemeFragment extends ThemeFragment {
} else {
if (isShowingCustomizeResetLayout()) {
hideCustomizeResetLayout();
+ } else {
+ super.performClick(clickedOnContent);
}
}
}
diff --git a/src/com/cyngn/theme/chooser/ThemeFragment.java b/src/com/cyngn/theme/chooser/ThemeFragment.java
index e6b4be3..a55a6dd 100644
--- a/src/com/cyngn/theme/chooser/ThemeFragment.java
+++ b/src/com/cyngn/theme/chooser/ThemeFragment.java
@@ -2237,6 +2237,18 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb
set.start();
}
+ private void disableActionButtons() {
+ mCustomize.setEnabled(false);
+ mDelete.setEnabled(false);
+ mReset.setEnabled(false);
+ }
+
+ private void enableActionButtons() {
+ mCustomize.setEnabled(true);
+ mDelete.setEnabled(true);
+ mReset.setEnabled(true);
+ }
+
public boolean isShowingConfirmCancelOverlay() {
return mConfirmCancelOverlay.getVisibility() == View.VISIBLE;
}
@@ -2254,6 +2266,8 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb
anim.setListener(null);
anim.setDuration(ANIMATE_APPLY_LAYOUT_DURATION);
anim.alpha(1f).start();
+
+ disableActionButtons();
}
public void showDeleteThemeOverlay() {
@@ -2269,6 +2283,8 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb
anim.setListener(null);
anim.setDuration(ANIMATE_APPLY_LAYOUT_DURATION);
anim.alpha(1f).start();
+
+ disableActionButtons();
}
public void showResetThemeOverlay() {
@@ -2284,6 +2300,8 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb
anim.setListener(null);
anim.setDuration(ANIMATE_APPLY_LAYOUT_DURATION);
anim.alpha(1f).start();
+
+ disableActionButtons();
}
public void hideConfirmCancelOverlay() {
@@ -2320,6 +2338,8 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb
public void onAnimationRepeat(Animator animation) {
}
});
+
+ enableActionButtons();
}
public boolean isShowingCustomizeResetLayout() {
@@ -2340,6 +2360,8 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb
anim.setListener(null);
anim.setDuration(ANIMATE_APPLY_LAYOUT_DURATION);
anim.alpha(1f).start();
+
+ disableActionButtons();
}
public void hideCustomizeResetLayout() {
@@ -2378,6 +2400,8 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb
public void onAnimationRepeat(Animator animation) {
}
});
+
+ enableActionButtons();
}
public void showThemeTagLayout() {
@@ -2405,6 +2429,8 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb
mDelete.setAlpha(0f);
mDelete.animate().alpha(1f).setDuration(ANIMATE_APPLY_LAYOUT_DURATION).start();
}
+
+ enableActionButtons();
}
public void fadeInCards() {