From fc94f184d2ff5a5208bd6667f45e35563fbae7dd Mon Sep 17 00:00:00 2001 From: Somethingweirdhere Date: Fri, 15 Jun 2018 05:43:43 +0200 Subject: [PATCH] Reduced lag and increased button size for older devices&users. --- .../schabi/newpipe/settings/ContentSettingsMain.java | 11 +++++++++-- app/src/main/res/layout/dialog_contentsettings.xml | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsMain.java b/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsMain.java index a7313eae8..0c31630e0 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsMain.java +++ b/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsMain.java @@ -40,7 +40,7 @@ public class ContentSettingsMain extends Fragment { RecyclerView usedTabsView; List usedTabs = new ArrayList<>(); - + private String saveString; public String[] allTabs = new String[7]; @Override @@ -81,10 +81,17 @@ public class ContentSettingsMain extends Fragment { } } + saveString = save.toString(); + } + + @Override + public void onPause() { + saveChanges(); SharedPreferences sharedPreferences = android.preference.PreferenceManager.getDefaultSharedPreferences(getContext()); SharedPreferences.Editor editor = sharedPreferences.edit(); - editor.putString("saveUsedTabs", save.toString()); + editor.putString("saveUsedTabs", saveString); editor.commit(); + super.onPause(); } private void initUsedTabs() { diff --git a/app/src/main/res/layout/dialog_contentsettings.xml b/app/src/main/res/layout/dialog_contentsettings.xml index ed379d267..7e62c7eba 100644 --- a/app/src/main/res/layout/dialog_contentsettings.xml +++ b/app/src/main/res/layout/dialog_contentsettings.xml @@ -30,8 +30,8 @@