mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-20 04:39:04 +00:00
Fix preferences design
This commit is contained in:
parent
1dd309cbbb
commit
48521d2bd6
4 changed files with 58 additions and 12 deletions
24
Habitica/res/layout/preference_category.xml
Normal file
24
Habitica/res/layout/preference_category.xml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2014 The Android Open Source Project
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<!-- Layout used for PreferenceCategory in a PreferenceActivity. -->
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+android:id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dip"
|
||||
style="?android:attr/listSeparatorTextViewStyle"
|
||||
android:background="@color/transparent"
|
||||
android:textColor="@color/brand_300"
|
||||
android:paddingLeft="48dip"
|
||||
android:paddingRight="48dip"
|
||||
android:paddingTop="16dip" />
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Layout for a visually child-like Preference in a PreferenceActivity. -->
|
||||
<!--suppress AndroidDomInspection -->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -7,13 +8,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">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="6dip"
|
||||
android:layout_marginLeft="15dip"
|
||||
android:layout_marginRight="6dip"
|
||||
android:layout_marginTop="6dip"
|
||||
android:layout_weight="1" >
|
||||
|
|
@ -39,4 +42,10 @@
|
|||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorSecondary" />
|
||||
</RelativeLayout>
|
||||
<LinearLayout android:id="@+android:id/widget_frame"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="16dp" />
|
||||
</LinearLayout>
|
||||
|
|
@ -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">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="6dip"
|
||||
android:layout_marginLeft="15dip"
|
||||
android:layout_marginRight="6dip"
|
||||
android:layout_marginTop="6dip"
|
||||
android:layout_weight="1" >
|
||||
|
|
@ -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" />
|
||||
</RelativeLayout>
|
||||
<LinearLayout android:id="@+id/widget_frame"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="16dp" />
|
||||
</LinearLayout>
|
||||
|
|
@ -6,7 +6,8 @@
|
|||
|
||||
<PreferenceCategory
|
||||
android:title="@string/pref_account_header"
|
||||
android:key="account_prefs">
|
||||
android:key="account_prefs"
|
||||
android:layout="@layout/preference_category">
|
||||
|
||||
<PreferenceScreen android:title="@string/profile"
|
||||
android:summary="@string/profile_summary"
|
||||
|
|
@ -110,7 +111,8 @@
|
|||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/app_settings">
|
||||
android:title="@string/app_settings"
|
||||
android:layout="@layout/preference_category">
|
||||
<ListPreference android:title="@string/pref_first_day_of_the_week_title"
|
||||
android:key="@string/pref_first_day_of_the_week_key"
|
||||
android:entries="@array/weekdays"
|
||||
|
|
@ -137,7 +139,8 @@
|
|||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/pref_reminder_header">
|
||||
android:title="@string/pref_reminder_header"
|
||||
android:layout="@layout/preference_category">
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="use_reminder"
|
||||
|
|
@ -154,7 +157,8 @@
|
|||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/pref_cds_header">
|
||||
android:title="@string/pref_cds_header"
|
||||
android:layout="@layout/preference_category">
|
||||
|
||||
<com.habitrpg.android.habitica.prefs.TimePreference
|
||||
android:key="cds_time"
|
||||
|
|
@ -164,7 +168,8 @@
|
|||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/push_notifications">
|
||||
android:title="@string/push_notifications"
|
||||
android:layout="@layout/preference_category">
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="usePushNotifications"
|
||||
|
|
@ -236,7 +241,8 @@
|
|||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/maintenance">
|
||||
android:title="@string/maintenance"
|
||||
android:layout="@layout/preference_category">
|
||||
<Preference android:title="@string/reload_content"
|
||||
android:key="reload_content"
|
||||
android:layout="@layout/preference_child_summary"/>
|
||||
|
|
|
|||
Loading…
Reference in a new issue