Skip to content

Commit

Permalink
Remove the old synchronizer preferences from the main settings screen…
Browse files Browse the repository at this point in the history
… in favor of the wizard being the primary synchronizer configuration source
  • Loading branch information
matburt committed Dec 1, 2012
1 parent 37f9059 commit d3b9f0a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
8 changes: 2 additions & 6 deletions res/xml/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -127,4 +123,4 @@
</PreferenceScreen>
</PreferenceCategory>

</PreferenceScreen>
</PreferenceScreen>
8 changes: 4 additions & 4 deletions src/com/matburt/mobileorg/Settings/SettingsActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
}
Expand Down

0 comments on commit d3b9f0a

Please sign in to comment.