diff --git a/res/values/cherish_arrays.xml b/res/values/cherish_arrays.xml index 7717d84..c85691c 100644 --- a/res/values/cherish_arrays.xml +++ b/res/values/cherish_arrays.xml @@ -539,4 +539,19 @@ 6 7 + + + + @string/pref_scrollingcache_force_enable + @string/pref_scrollingcache_default_enable + @string/pref_scrollingcache_default_disable + @string/pref_scrollingcache_force_disable + + + + 0 + 1 + 2 + 3 + diff --git a/res/values/cherish_strings.xml b/res/values/cherish_strings.xml index 0a4e85e..887d3bf 100644 --- a/res/values/cherish_strings.xml +++ b/res/values/cherish_strings.xml @@ -606,4 +606,12 @@ Overshoot Anticipate and overshoot Bounce + + + Scrolling cache + Scrolling cache may improve scrolling performance at the cost of memory + Force enable + Default enable + Default disable + Force disable diff --git a/res/xml/cherish_settings_animations.xml b/res/xml/cherish_settings_animations.xml index 3c33021..be3fdc1 100644 --- a/res/xml/cherish_settings_animations.xml +++ b/res/xml/cherish_settings_animations.xml @@ -69,6 +69,14 @@ + + 0); + mScrollingCachePref = (ListPreference) findPreference(SCROLLINGCACHE_PREF); + mScrollingCachePref.setValue(SystemProperties.get(SCROLLINGCACHE_PERSIST_PROP, + SystemProperties.get(SCROLLINGCACHE_PERSIST_PROP, SCROLLINGCACHE_DEFAULT))); + mScrollingCachePref.setOnPreferenceChangeListener(this); + mAnimations = AwesomeAnimationHelper.getAnimationsList(); int animqty = mAnimations.length; mAnimationsStrings = new String[animqty]; @@ -228,6 +237,11 @@ public class AnimationsSettings extends SettingsPreferenceFragment Settings.Global.LISTVIEW_INTERPOLATOR, value); mListViewInterpolator.setSummary(mListViewInterpolator.getEntries()[index]); return true; + } else if (preference == mScrollingCachePref) { + if (newValue != null) { + SystemProperties.set(SCROLLINGCACHE_PERSIST_PROP, (String) newValue); + } + return true; } else if (preference == mActivityOpenPref) { int val = Integer.parseInt((String) newValue); result = Settings.Global.putInt(mContext.getContentResolver(),