Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove the old synchronizer preferences from the main settings screen…

… in favor of the wizard being the primary synchronizer configuration source
  • Loading branch information...
commit d3b9f0aab1073509f3c720079679cd52304c8d5d 1 parent 37f9059
@matburt authored
View
8 res/xml/preferences.xml
@@ -11,14 +11,10 @@
android:entries="@array/fileSources"
android:entryValues="@array/fileSourcesVals"
android:key="syncSource"
+ android:selectable="false"
android:summary="@string/preference_sync_source_summary"
android:title="@string/preference_sync_source_title" />
- <com.matburt.mobileorg.Settings.SynchronizerPreferences
- android:defaultValue="32"
- android:key="syncPref"
- android:title="Custom Preference" />
-
<CheckBoxPreference
android:key="doAutoSync"
android:summary="@string/summary_do_auto_sync"
@@ -127,4 +123,4 @@
</PreferenceScreen>
</PreferenceCategory>
-</PreferenceScreen>
+</PreferenceScreen>
View
8 src/com/matburt/mobileorg/Settings/SettingsActivity.java
@@ -62,8 +62,8 @@ protected void onCreate(Bundle savedInstanceState) {
.getDefaultSharedPreferences(getApplicationContext());
appSettings.registerOnSharedPreferenceChangeListener(this);
- SynchronizerPreferences sync = (SynchronizerPreferences) findPreference(KEY_SYNC_PREF);
- sync.setParentActivity(this);
+ // SynchronizerPreferences sync = (SynchronizerPreferences) findPreference(KEY_SYNC_PREF);
+ // sync.setParentActivity(this);
// Manually invoke so that settings are pre-loaded and sync preference is enabled or disabled as appropriate
onSharedPreferenceChanged(appSettings, KEY_SYNC_SOURCE);
@@ -110,11 +110,11 @@ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
if (key.equals(KEY_SYNC_SOURCE)) {
if (sharedPreferences.getString(key, "").equals("null")) {
// Disable synchronizer settings
- findPreference(KEY_SYNC_PREF).setEnabled(false);
+ //findPreference(KEY_SYNC_PREF).setEnabled(false);
findPreference(KEY_DO_AUTO_SYNC).setEnabled(false);
} else {
// Disable synchronizer settings
- findPreference(KEY_SYNC_PREF).setEnabled(true);
+ //findPreference(KEY_SYNC_PREF).setEnabled(true);
findPreference(KEY_DO_AUTO_SYNC).setEnabled(true);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.