From a588ec084bbdf8550bc3cac502f115fb63a45e5c Mon Sep 17 00:00:00 2001 From: BO41 Date: Tue, 28 Aug 2018 19:30:44 +0200 Subject: [PATCH] correctness use apply() on SharedPreferences use dp instead of sp for text sizes BUILD SUCCESSFUL in 22s 39 actionable tasks: 10 executed, 29 up-to-date --- .../org/schabi/newpipe/settings/ContentSettingsFragment.java | 2 +- app/src/main/res/layout-v21/drawer_header.xml | 4 ++-- app/src/main/res/layout/drawer_header.xml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java index 0ca78b34a..ca48ed8b5 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java @@ -264,7 +264,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment { else if (v instanceof String) prefEdit.putString(key, ((String) v)); } - prefEdit.commit(); + prefEdit.apply(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { diff --git a/app/src/main/res/layout-v21/drawer_header.xml b/app/src/main/res/layout-v21/drawer_header.xml index 9336c8d9c..4474ee4ed 100644 --- a/app/src/main/res/layout-v21/drawer_header.xml +++ b/app/src/main/res/layout-v21/drawer_header.xml @@ -40,7 +40,7 @@ android:layout_toRightOf="@id/drawer_header_np_nude_view" android:gravity="center" android:text="@string/app_name" - android:textSize="30dp" + android:textSize="30sp" android:textColor="@color/drawer_header_font_color" android:textStyle="bold|italic" /> @@ -52,7 +52,7 @@ android:layout_alignStart="@id/drawer_header_np_text_view" android:layout_below="@id/drawer_header_np_text_view" android:text="YouTube" - android:textSize="18dp" + android:textSize="18sp" android:textColor="@color/drawer_header_font_color" android:textStyle="italic" /> diff --git a/app/src/main/res/layout/drawer_header.xml b/app/src/main/res/layout/drawer_header.xml index 833abe1c6..0458773d7 100644 --- a/app/src/main/res/layout/drawer_header.xml +++ b/app/src/main/res/layout/drawer_header.xml @@ -40,7 +40,7 @@ android:focusable="true"> android:layout_alignTop="@id/drawer_header_np_nude_view" android:layout_alignBottom="@id/drawer_header_np_nude_view" android:gravity="center" - android:textSize="30dp" + android:textSize="30sp" android:textColor="@color/drawer_header_font_color" android:textStyle="bold|italic"/> @@ -52,7 +52,7 @@ android:focusable="true"> android:layout_below="@id/drawer_header_np_text_view" android:layout_alignLeft="@id/drawer_header_np_text_view" android:layout_alignStart="@id/drawer_header_np_text_view" - android:textSize="18dp" + android:textSize="18sp" android:textColor="@color/drawer_header_font_color" android:textStyle="italic"/>