summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLuis Vidal <lvidal@cyngn.com>2016-01-21 16:42:15 -0800
committerLuis Vidal <lvidal@cyngn.com>2016-01-22 16:27:11 -0800
commit7e000ea34bc177ce016edd0fcda1a76242e08f4f (patch)
tree8ca4701d8c5db176f3e232b2b52adc92f9757ada /src
parent3ecb1a8f6b2f530d61cdef4e38b4566af3171878 (diff)
downloadpackages_apps_ThemeChooser-7e000ea34bc177ce016edd0fcda1a76242e08f4f.zip
packages_apps_ThemeChooser-7e000ea34bc177ce016edd0fcda1a76242e08f4f.tar.gz
packages_apps_ThemeChooser-7e000ea34bc177ce016edd0fcda1a76242e08f4f.tar.bz2
Don't show add icon when user selects None
This patch prevents the add ("+") icon from being displayed on the lock screen card when user selects None. Change-Id: Icd5a86ddcbf00765bc1844c2f78b6188d2706be5 TICKET: CHOOSER-107
Diffstat (limited to 'src')
-rw-r--r--src/com/cyngn/theme/chooser/MyThemeFragment.java2
-rw-r--r--src/com/cyngn/theme/chooser/ThemeFragment.java12
2 files changed, 13 insertions, 1 deletions
diff --git a/src/com/cyngn/theme/chooser/MyThemeFragment.java b/src/com/cyngn/theme/chooser/MyThemeFragment.java
index 2b76d5b..9803b55 100644
--- a/src/com/cyngn/theme/chooser/MyThemeFragment.java
+++ b/src/com/cyngn/theme/chooser/MyThemeFragment.java
@@ -482,7 +482,7 @@ public class MyThemeFragment extends ThemeFragment {
}
if (wp != null) {
mLockScreenCard.setWallpaper(wp);
- } else {
+ } else if (!mSelectedComponentsMap.containsKey(ThemesColumns.MODIFIES_LOCKSCREEN)) {
mLockScreenCard.clearWallpaper();
mLockScreenCard.setEmptyViewEnabled(true);
setAddComponentTitle(mLockScreenCard, getString(R.string.lockscreen_label));
diff --git a/src/com/cyngn/theme/chooser/ThemeFragment.java b/src/com/cyngn/theme/chooser/ThemeFragment.java
index 3cc229d..7f9d2af 100644
--- a/src/com/cyngn/theme/chooser/ThemeFragment.java
+++ b/src/com/cyngn/theme/chooser/ThemeFragment.java
@@ -2077,6 +2077,9 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb
}
setCardTitle(mLockScreenCard, WALLPAPER_NONE,
getString(R.string.lockscreen_label));
+ if (mLockScreenCard.isShowingEmptyView()) {
+ mLockScreenCard.setEmptyViewEnabled(false);
+ }
} else if (ComponentSelector.EXTERNAL_WALLPAPER.equals(pkgName)) {
// Check if we have READ_EXTERNAL_STORAGE permission and if not request it,
// otherwise let the user pick an image
@@ -2622,6 +2625,15 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb
mSelectedComponentsMap.clear();
mExternalWallpaperUri = null;
mExternalLockscreenUri = null;
+ View none = mLockScreenCard.findViewById(R.id.none);
+ if (none != null && none.getVisibility() == View.VISIBLE) {
+ none.setVisibility(View.GONE);
+ }
+ TextView tv = (TextView) mLockScreenCard.findViewById(R.id.label);
+ if (tv != null) {
+ tv.setAlpha(1f);
+ tv.setBackgroundResource(R.drawable.wallpaper_label_bg);
+ }
getLoaderManager().restartLoader(LOADER_ID_ALL, null, ThemeFragment.this);
}