development
Revision | 49f4090c7a1335d4ca0906d423bd96ae9f7852f4 (tree) |
---|---|
Zeit | 2009-03-28 11:03:33 |
Autor | Dianne Hackborn <> |
Commiter | The Android Open Source Project |
AI 143220: am: CL 143022 New spare parts feature. Spare parts is only in engineering builds, so I am hoping it is okay to check in -- it's the same as updating sample code etc.
Automated import of CL 143220
@@ -45,6 +45,10 @@ | ||
45 | 45 | <string name="summary_on_fancy_ime_animations">Use fancier animations for input method windows</string> |
46 | 46 | <string name="summary_off_fancy_ime_animations">Use normal animations for input method windows</string> |
47 | 47 | |
48 | + <string name="title_fancy_rotation_animations">Fancy rotation animations</string> | |
49 | + <string name="summary_on_fancy_rotation_animations">Use fancier animations for screen rotation</string> | |
50 | + <string name="summary_off_fancy_rotation_animations">Use normal animations for screen rotation</string> | |
51 | + | |
48 | 52 | <string name="title_haptic_feedback">Haptic feedback</string> |
49 | 53 | <string name="summary_on_haptic_feedback">Use haptic feedback with user interaction</string> |
50 | 54 | <string name="summary_off_haptic_feedback">Use haptic feedback with user interaction</string> |
@@ -72,6 +72,12 @@ | ||
72 | 72 | android:summaryOn="@string/summary_on_fancy_ime_animations" |
73 | 73 | android:summaryOff="@string/summary_off_fancy_ime_animations"/> |
74 | 74 | |
75 | + <CheckBoxPreference | |
76 | + android:key="fancy_rotation_animations" | |
77 | + android:title="@string/title_fancy_rotation_animations" | |
78 | + android:summaryOn="@string/summary_on_fancy_rotation_animations" | |
79 | + android:summaryOff="@string/summary_off_fancy_rotation_animations"/> | |
80 | + | |
75 | 81 | <ListPreference |
76 | 82 | android:key="font_size" |
77 | 83 | android:title="@string/title_font_size" |
@@ -54,6 +54,7 @@ public class SpareParts extends PreferenceActivity | ||
54 | 54 | private static final String WINDOW_ANIMATIONS_PREF = "window_animations"; |
55 | 55 | private static final String TRANSITION_ANIMATIONS_PREF = "transition_animations"; |
56 | 56 | private static final String FANCY_IME_ANIMATIONS_PREF = "fancy_ime_animations"; |
57 | + private static final String FANCY_ROTATION_ANIMATIONS_PREF = "fancy_rotation_animations"; | |
57 | 58 | private static final String HAPTIC_FEEDBACK_PREF = "haptic_feedback"; |
58 | 59 | private static final String FONT_SIZE_PREF = "font_size"; |
59 | 60 | private static final String END_BUTTON_PREF = "end_button"; |
@@ -64,6 +65,7 @@ public class SpareParts extends PreferenceActivity | ||
64 | 65 | private ListPreference mWindowAnimationsPref; |
65 | 66 | private ListPreference mTransitionAnimationsPref; |
66 | 67 | private CheckBoxPreference mFancyImeAnimationsPref; |
68 | + private CheckBoxPreference mFancyRotationAnimationsPref; | |
67 | 69 | private CheckBoxPreference mHapticFeedbackPref; |
68 | 70 | private ListPreference mFontSizePref; |
69 | 71 | private ListPreference mEndButtonPref; |
@@ -118,6 +120,7 @@ public class SpareParts extends PreferenceActivity | ||
118 | 120 | mTransitionAnimationsPref = (ListPreference) prefSet.findPreference(TRANSITION_ANIMATIONS_PREF); |
119 | 121 | mTransitionAnimationsPref.setOnPreferenceChangeListener(this); |
120 | 122 | mFancyImeAnimationsPref = (CheckBoxPreference) prefSet.findPreference(FANCY_IME_ANIMATIONS_PREF); |
123 | + mFancyRotationAnimationsPref = (CheckBoxPreference) prefSet.findPreference(FANCY_ROTATION_ANIMATIONS_PREF); | |
121 | 124 | mHapticFeedbackPref = (CheckBoxPreference) prefSet.findPreference(HAPTIC_FEEDBACK_PREF); |
122 | 125 | mFontSizePref = (ListPreference) prefSet.findPreference(FONT_SIZE_PREF); |
123 | 126 | mFontSizePref.setOnPreferenceChangeListener(this); |
@@ -143,6 +146,9 @@ public class SpareParts extends PreferenceActivity | ||
143 | 146 | mFancyImeAnimationsPref.setChecked(Settings.System.getInt( |
144 | 147 | getContentResolver(), |
145 | 148 | Settings.System.FANCY_IME_ANIMATIONS, 0) != 0); |
149 | + mFancyRotationAnimationsPref.setChecked(Settings.System.getInt( | |
150 | + getContentResolver(), | |
151 | + "fancy_rotation_anim", 0) != 0); | |
146 | 152 | mHapticFeedbackPref.setChecked(Settings.System.getInt( |
147 | 153 | getContentResolver(), |
148 | 154 | Settings.System.HAPTIC_FEEDBACK_ENABLED, 0) != 0); |
@@ -241,6 +247,10 @@ public class SpareParts extends PreferenceActivity | ||
241 | 247 | Settings.System.putInt(getContentResolver(), |
242 | 248 | Settings.System.FANCY_IME_ANIMATIONS, |
243 | 249 | mFancyImeAnimationsPref.isChecked() ? 1 : 0); |
250 | + } else if (FANCY_ROTATION_ANIMATIONS_PREF.equals(key)) { | |
251 | + Settings.System.putInt(getContentResolver(), | |
252 | + "fancy_rotation_anim", | |
253 | + mFancyRotationAnimationsPref.isChecked() ? 1 : 0); | |
244 | 254 | } else if (HAPTIC_FEEDBACK_PREF.equals(key)) { |
245 | 255 | Settings.System.putInt(getContentResolver(), |
246 | 256 | Settings.System.HAPTIC_FEEDBACK_ENABLED, |