diff options
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/ui/settings/SettingsFragment.java')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/settings/SettingsFragment.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/settings/SettingsFragment.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/settings/SettingsFragment.java new file mode 100644 index 000000000..30de63958 --- /dev/null +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/settings/SettingsFragment.java @@ -0,0 +1,26 @@ +package it.niedermann.nextcloud.deck.ui.settings; + +import android.os.Bundle; +import android.preference.Preference; +import android.preference.PreferenceFragment; +import android.preference.SwitchPreference; + +import androidx.annotation.Nullable; + +import it.niedermann.nextcloud.deck.DeckLog; +import it.niedermann.nextcloud.deck.R; + +public class SettingsFragment extends PreferenceFragment { + @Override + public void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + addPreferencesFromResource(R.xml.settings); + + final SwitchPreference wifiOnlyPref = (SwitchPreference) findPreference(getString(R.string.pref_key_wifi_only)); + wifiOnlyPref.setOnPreferenceChangeListener((Preference preference, Object newValue) -> { + Boolean syncOnWifiOnly = (Boolean) newValue; + DeckLog.log("syncOnWifiOnly: " + syncOnWifiOnly); + return true; + }); + } +} |