From 3a17710531ad2563b076be8b8e4748e025113e63 Mon Sep 17 00:00:00 2001 From: Ezerous Date: Tue, 6 Nov 2018 14:29:21 +0200 Subject: [PATCH] Removed margin from Settings --- app/build.gradle | 6 +-- .../activities/settings/SettingsFragment.java | 6 +-- .../res/xml-v26/app_preferences_guest.xml | 19 +++++--- .../main/res/xml-v26/app_preferences_user.xml | 32 +++++++++----- .../main/res/xml/app_preferences_guest.xml | 32 +++++++++----- app/src/main/res/xml/app_preferences_user.xml | 44 +++++++++++++------ 6 files changed, 92 insertions(+), 47 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index cfb58070..545832f3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -54,8 +54,8 @@ tasks.whenTaskAdded { task -> dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'androidx.appcompat:appcompat:1.0.0' - implementation 'androidx.preference:preference:1.0.0' + implementation 'androidx.appcompat:appcompat:1.0.1' + implementation 'androidx.preference:preference:1.1.0-alpha01' implementation 'androidx.legacy:legacy-preference-v14:1.0.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.cardview:cardview:1.0.0' @@ -63,7 +63,7 @@ dependencies { implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'com.google.android.material:material:1.0.0' - implementation 'com.google.firebase:firebase-core:16.0.4' + implementation 'com.google.firebase:firebase-core:16.0.5' implementation 'com.google.firebase:firebase-messaging:17.3.4' implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5' implementation 'com.squareup.okhttp3:okhttp:3.11.0' diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/settings/SettingsFragment.java b/app/src/main/java/gr/thmmy/mthmmy/activities/settings/SettingsFragment.java index eb0a2070..a66f91ae 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/settings/SettingsFragment.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/settings/SettingsFragment.java @@ -28,7 +28,7 @@ public class SettingsFragment extends PreferenceFragmentCompat implements Shared NOT_SET, USER, GUEST } - public static final String ARG_IS_LOGGED_IN = "selectedRingtoneKey"; + private static final String ARG_IS_LOGGED_IN = "selectedRingtoneKey"; //Preferences xml keys private static final String SELECTED_NOTIFICATIONS_SOUND = "pref_notifications_select_sound_key"; @@ -44,7 +44,7 @@ public class SettingsFragment extends PreferenceFragmentCompat implements Shared private SharedPreferences settingsFile; private PREFS_TYPE prefs_type = PREFS_TYPE.NOT_SET; - private boolean isLoggedIn = false; + private boolean isLoggedIn; private ArrayList defaultHomeTabEntries = new ArrayList<>(); private ArrayList defaultHomeTabValues = new ArrayList<>(); @@ -161,7 +161,7 @@ public class SettingsFragment extends PreferenceFragmentCompat implements Shared } } - public void updateUserLoginState(boolean isLoggedIn) { + void updateUserLoginState(boolean isLoggedIn) { this.isLoggedIn = isLoggedIn; updatePreferenceVisibility(); } diff --git a/app/src/main/res/xml-v26/app_preferences_guest.xml b/app/src/main/res/xml-v26/app_preferences_guest.xml index 2aa3e166..942c2692 100644 --- a/app/src/main/res/xml-v26/app_preferences_guest.xml +++ b/app/src/main/res/xml-v26/app_preferences_guest.xml @@ -1,7 +1,10 @@ - + - + + android:summary="@string/pref_summary_app_main_default_tab" + app:iconSpaceReserved="false" /> + android:title="@string/pref_category_privacy" + app:iconSpaceReserved="false"> + android:summary="@string/pref_summary_privacy_crashlytics_enable" + app:iconSpaceReserved="false" /> + android:summary="@string/pref_summary_privacy_analytics_enable" + app:iconSpaceReserved="false" /> diff --git a/app/src/main/res/xml-v26/app_preferences_user.xml b/app/src/main/res/xml-v26/app_preferences_user.xml index 6010320f..fe301eb3 100644 --- a/app/src/main/res/xml-v26/app_preferences_user.xml +++ b/app/src/main/res/xml-v26/app_preferences_user.xml @@ -1,7 +1,10 @@ - + - + + android:summary="@string/pref_summary_app_main_default_tab" + app:iconSpaceReserved="false" /> + android:title="@string/pref_category_posting" + app:iconSpaceReserved="false"> + android:summary="@string/pref_summary_posting_app_signature_enable" + app:iconSpaceReserved="false" /> + android:title="@string/pref_category_privacy" + app:iconSpaceReserved="false"> + android:summary="@string/pref_summary_privacy_crashlytics_enable" + app:iconSpaceReserved="false" /> + android:summary="@string/pref_summary_privacy_analytics_enable" + app:iconSpaceReserved="false" /> - diff --git a/app/src/main/res/xml/app_preferences_guest.xml b/app/src/main/res/xml/app_preferences_guest.xml index 364ad5a1..ebfeaa26 100644 --- a/app/src/main/res/xml/app_preferences_guest.xml +++ b/app/src/main/res/xml/app_preferences_guest.xml @@ -1,7 +1,10 @@ - + - + + android:summary="@string/pref_summary_app_main_default_tab" + app:iconSpaceReserved="false" /> - + + android:title="@string/pref_title_notification_vibration_enable" + app:iconSpaceReserved="false" /> + android:summary="@string/pref_summary_notification_led_enable" + app:iconSpaceReserved="false" /> + android:summary="@string/pref_summary_notifications_sound" + app:iconSpaceReserved="false" /> + android:title="@string/pref_category_privacy" + app:iconSpaceReserved="false"> + android:summary="@string/pref_summary_privacy_crashlytics_enable" + app:iconSpaceReserved="false" /> + android:summary="@string/pref_summary_privacy_analytics_enable" + app:iconSpaceReserved="false" /> diff --git a/app/src/main/res/xml/app_preferences_user.xml b/app/src/main/res/xml/app_preferences_user.xml index 9778f340..2599df44 100644 --- a/app/src/main/res/xml/app_preferences_user.xml +++ b/app/src/main/res/xml/app_preferences_user.xml @@ -1,7 +1,10 @@ - + - + + android:summary="@string/pref_summary_app_main_default_tab" + app:iconSpaceReserved="false" /> - + + android:title="@string/pref_title_notification_vibration_enable" + app:iconSpaceReserved="false" /> + android:summary="@string/pref_summary_notification_led_enable" + app:iconSpaceReserved="false" /> + android:summary="@string/pref_summary_notifications_sound" + app:iconSpaceReserved="false" /> + android:title="@string/pref_category_posting" + app:iconSpaceReserved="false"> + android:summary="@string/pref_summary_posting_app_signature_enable" + app:iconSpaceReserved="false" /> + android:title="@string/pref_category_privacy" + app:iconSpaceReserved="false"> + android:summary="@string/pref_summary_privacy_crashlytics_enable" + app:iconSpaceReserved="false" /> + android:summary="@string/pref_summary_privacy_analytics_enable" + app:iconSpaceReserved="false"/> \ No newline at end of file