From 48521d2bd6c074e209550971f4622155803589fe Mon Sep 17 00:00:00 2001 From: Phillip Thelen Date: Wed, 31 Oct 2018 14:56:46 +0100 Subject: [PATCH] Fix preferences design --- Habitica/res/layout/preference_category.xml | 24 +++++++++++++++++++ .../res/layout/preference_child_summary.xml | 13 ++++++++-- .../layout/preference_child_summary_error.xml | 15 ++++++++---- Habitica/res/xml/preferences_fragment.xml | 18 +++++++++----- 4 files changed, 58 insertions(+), 12 deletions(-) create mode 100644 Habitica/res/layout/preference_category.xml diff --git a/Habitica/res/layout/preference_category.xml b/Habitica/res/layout/preference_category.xml new file mode 100644 index 000000000..6a0517c13 --- /dev/null +++ b/Habitica/res/layout/preference_category.xml @@ -0,0 +1,24 @@ + + + + \ No newline at end of file diff --git a/Habitica/res/layout/preference_child_summary.xml b/Habitica/res/layout/preference_child_summary.xml index 7ff3fce41..68f7b136d 100644 --- a/Habitica/res/layout/preference_child_summary.xml +++ b/Habitica/res/layout/preference_child_summary.xml @@ -1,5 +1,6 @@ + + android:paddingRight="16dip" + android:paddingLeft="16dip" + android:orientation="horizontal"> @@ -39,4 +42,10 @@ android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="?android:attr/textColorSecondary" /> + \ No newline at end of file diff --git a/Habitica/res/layout/preference_child_summary_error.xml b/Habitica/res/layout/preference_child_summary_error.xml index 12fe83e29..14076d1e5 100644 --- a/Habitica/res/layout/preference_child_summary_error.xml +++ b/Habitica/res/layout/preference_child_summary_error.xml @@ -7,13 +7,15 @@ android:baselineAligned="false" android:gravity="center_vertical" android:minHeight="?android:attr/listPreferredItemHeight" - android:paddingRight="?android:attr/scrollbarSize" - android:paddingLeft="16dip"> + android:paddingRight="16dip" + android:paddingLeft="16dip" + android:orientation="horizontal"> @@ -37,7 +39,12 @@ android:layout_below="@android:id/title" android:maxLines="4" android:textAppearance="?android:attr/textAppearanceSmall" - android:textColor="@color/red_10" - /> + android:textColor="@color/red_10" /> + \ No newline at end of file diff --git a/Habitica/res/xml/preferences_fragment.xml b/Habitica/res/xml/preferences_fragment.xml index 3d2e9d9eb..21f7b15aa 100644 --- a/Habitica/res/xml/preferences_fragment.xml +++ b/Habitica/res/xml/preferences_fragment.xml @@ -6,7 +6,8 @@ + android:key="account_prefs" + android:layout="@layout/preference_category"> + android:title="@string/app_settings" + android:layout="@layout/preference_category"> + android:title="@string/pref_reminder_header" + android:layout="@layout/preference_category"> + android:title="@string/pref_cds_header" + android:layout="@layout/preference_category"> + android:title="@string/push_notifications" + android:layout="@layout/preference_category"> + android:title="@string/maintenance" + android:layout="@layout/preference_category">