Comment the SettingsActivity
This commit is contained in:
parent
798c970e3f
commit
5f1d47facf
1 changed files with 11 additions and 0 deletions
|
@ -55,7 +55,11 @@ import java.util.Map;
|
||||||
* Android Design: Settings</a> for design guidelines and the <a
|
* Android Design: Settings</a> for design guidelines and the <a
|
||||||
* href="http://developer.android.com/guide/topics/ui/settings.html">Settings
|
* href="http://developer.android.com/guide/topics/ui/settings.html">Settings
|
||||||
* API Guide</a> for more information on developing a Settings UI.
|
* API Guide</a> for more information on developing a Settings UI.
|
||||||
|
*
|
||||||
|
* The SettingsActivity is extended by AppCompatPreferenceActivity
|
||||||
|
* The activity is responsible for the different app settings.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class SettingsActivity extends AppCompatPreferenceActivity {
|
public class SettingsActivity extends AppCompatPreferenceActivity {
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
@ -78,6 +82,10 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
|
||||||
|
|
||||||
SharedPreferences.OnSharedPreferenceChangeListener x = new SharedPreferences.OnSharedPreferenceChangeListener() {
|
SharedPreferences.OnSharedPreferenceChangeListener x = new SharedPreferences.OnSharedPreferenceChangeListener() {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Case differentiation for the different Night Mode options
|
||||||
|
* @param sharedPreferences
|
||||||
|
*/
|
||||||
|
|
||||||
public void recheckNightModeProperties(SharedPreferences sharedPreferences){
|
public void recheckNightModeProperties(SharedPreferences sharedPreferences){
|
||||||
if (sharedPreferences.getBoolean("pref_dark_mode_setting", false )) {
|
if (sharedPreferences.getBoolean("pref_dark_mode_setting", false )) {
|
||||||
|
@ -107,6 +115,9 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* is responsible for closing and opening the activity
|
||||||
|
*/
|
||||||
public void restartActivity() {
|
public void restartActivity() {
|
||||||
Intent i = new Intent(getApplicationContext(), MainActivity.class);
|
Intent i = new Intent(getApplicationContext(), MainActivity.class);
|
||||||
recreate();
|
recreate();
|
||||||
|
|
Loading…
Reference in a new issue