diff --git a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/SettingsActivity.java b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/SettingsActivity.java index f6c20fd..f749e46 100644 --- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/SettingsActivity.java +++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/SettingsActivity.java @@ -213,16 +213,34 @@ public class SettingsActivity extends AppCompatPreferenceActivity { addPreferencesFromResource(R.xml.pref_settings_general); setHasOptionsMenu(true); - // Bind the summaries of EditText/List/Dialog/Ringtone preferences - // to their values. When their values change, their summaries are - // updated to reflect the new value, per the Android Design - // guidelines. - //bindPreferenceSummaryToValue(findPreference("example_text")); - //bindPreferenceSummaryToValue(findPreference("example_list")); + PreferenceManager preferenceManager = getPreferenceManager(); + SharedPreferences sp = preferenceManager.getSharedPreferences(); - } + if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { + if (sp.getBoolean("pref_dark_mode_setting", false)) { + //TwoStatePreference x = (TwoStatePreference) findPreference("pref_dark_mode_automatically_by_system"); + //x.setEnabled(false); + findPreference("pref_dark_mode_automatically_by_system").setEnabled(false); + findPreference("pref_dark_mode_automatically_by_battery").setEnabled(false); + } else { + + findPreference("pref_dark_mode_automatically_by_system").setEnabled(!sp.getBoolean("pref_dark_mode_automatically_by_battery", false)); + findPreference("pref_dark_mode_automatically_by_battery").setEnabled(!sp.getBoolean("pref_dark_mode_automatically_by_system", false)); + } + + // Bind the summaries of EditText/List/Dialog/Ringtone preferences + // to their values. When their values change, their summaries are + // updated to reflect the new value, per the Android Design + // guidelines. + + //bindPreferenceSummaryToValue(findPreference("example_text")); + //bindPreferenceSummaryToValue(findPreference("example_list")); + + } + + } @Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); diff --git a/app/src/main/res/layout/activity_daily_sudoku.xml b/app/src/main/res/layout/activity_daily_sudoku.xml index b691388..13f345c 100644 --- a/app/src/main/res/layout/activity_daily_sudoku.xml +++ b/app/src/main/res/layout/activity_daily_sudoku.xml @@ -166,6 +166,7 @@ android:layout_height="wrap_content" android:layout_gravity="center" android:layout_weight="2" + android:gravity="center" android:text="@string/number_of_completed_games" /> Berechtigungen Schaltet zwischen Notizen- und Werteingabe hin und her Notizen + Fertigstellen + Ist zur Bestätigung der Zahleneingabe im "Create Sudoku" Spielmodus Zeigt an, ob die korrekte Anzahl des Wertes im Spielfeld vorkommt. Zeigt an, dass der Wert ausgewählt ist. Jede Berührung eines Feldes setzt in diesem Modus die Zahl direkt, ohne das Feld vorher auszuwählen. Tastatur @@ -109,7 +111,7 @@ Sudoku des Tages Du hast das Sudoku des Tages bereits gelöst. Benutzte Hinweise - + Abgeschlossene
Spiele
Sudoku importieren Möchtest du dieses Sudoku fertigstellen? diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f40a3ff..d475097 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -138,6 +138,8 @@ Deletes a selected field Note toggle button Toggles if numbers should be set as notes or as values in a field + Finalize button + Is used to confirm the numeric input in the create sudoku game mode Privacy Info Permissions Privacy Friendly Sudoku does not use any permissions. diff --git a/app/src/main/res/xml-v29/pref_settings_general.xml b/app/src/main/res/xml-v29/pref_settings_general.xml new file mode 100644 index 0000000..70ee3bf --- /dev/null +++ b/app/src/main/res/xml-v29/pref_settings_general.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/xml/pref_help_general.xml b/app/src/main/res/xml/pref_help_general.xml index 7b711e4..16300d3 100644 --- a/app/src/main/res/xml/pref_help_general.xml +++ b/app/src/main/res/xml/pref_help_general.xml @@ -34,6 +34,10 @@ android:selectable="false" android:icon="@drawable/ic_create_black_48dp" android:summary="@string/help_notes_summary"/> + diff --git a/app/src/main/res/xml/pref_settings_general.xml b/app/src/main/res/xml/pref_settings_general.xml index f53c0cc..4db23b3 100644 --- a/app/src/main/res/xml/pref_settings_general.xml +++ b/app/src/main/res/xml/pref_settings_general.xml @@ -36,18 +36,6 @@ android:summary="@string/pref_dark_mode_summary" android:defaultValue="true"/> - - - - @@ -99,4 +87,4 @@ android:negativeButtonText="@null" android:positiveButtonText="@null" /> --> - + \ No newline at end of file