diff options
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/layout/activity_comment.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_edit_comment.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_edit_post.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_post_image.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_post_link.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_post_text.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_post_video.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/dialog_edit_flair.xml | 1 | ||||
-rw-r--r-- | app/src/main/res/layout/item_comment.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/item_post.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/item_post_detail.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/layout/item_rule.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/values/arrays.xml | 30 | ||||
-rw-r--r-- | app/src/main/res/values/attr.xml | 16 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/values/styles.xml | 79 | ||||
-rw-r--r-- | app/src/main/res/xml/font_size_preferences.xml | 29 | ||||
-rw-r--r-- | app/src/main/res/xml/main_preferences.xml | 8 |
18 files changed, 174 insertions, 25 deletions
diff --git a/app/src/main/res/layout/activity_comment.xml b/app/src/main/res/layout/activity_comment.xml index f5c5afe1..2a3629d7 100644 --- a/app/src/main/res/layout/activity_comment.xml +++ b/app/src/main/res/layout/activity_comment.xml @@ -37,7 +37,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="16dp" - android:textSize="?attr/font_16" /> + android:textSize="?attr/content_font_16" /> <EditText android:id="@+id/comment_edit_text_comment_activity" @@ -46,7 +46,7 @@ android:gravity="top" android:hint="@string/write_comment_hint" android:inputType="textCapSentences|textMultiLine" - android:textSize="?attr/font_18" + android:textSize="?attr/content_font_18" android:background="#00000000" android:textColor="@color/primaryTextColor" /> diff --git a/app/src/main/res/layout/activity_edit_comment.xml b/app/src/main/res/layout/activity_edit_comment.xml index 94f9b602..10b7241b 100644 --- a/app/src/main/res/layout/activity_edit_comment.xml +++ b/app/src/main/res/layout/activity_edit_comment.xml @@ -29,7 +29,7 @@ android:padding="16dp" android:hint="@string/post_text_content_hint" android:inputType="textCapSentences|textMultiLine" - android:textSize="?attr/font_18" + android:textSize="?attr/content_font_18" android:background="#00000000" android:textColor="@color/primaryTextColor" app:layout_behavior="@string/appbar_scrolling_view_behavior" /> diff --git a/app/src/main/res/layout/activity_edit_post.xml b/app/src/main/res/layout/activity_edit_post.xml index e7645c5e..1606fc16 100644 --- a/app/src/main/res/layout/activity_edit_post.xml +++ b/app/src/main/res/layout/activity_edit_post.xml @@ -37,7 +37,7 @@ android:layout_height="wrap_content" android:gravity="top" android:padding="16dp" - android:textSize="?attr/font_18" + android:textSize="?attr/title_font_18" android:textColor="@color/primaryTextColor" /> <View @@ -53,7 +53,7 @@ android:padding="16dp" android:hint="@string/post_text_content_hint" android:inputType="textCapSentences|textMultiLine" - android:textSize="?attr/font_18" + android:textSize="?attr/content_font_18" android:background="#00000000" android:textColor="@color/primaryTextColor" /> diff --git a/app/src/main/res/layout/activity_post_image.xml b/app/src/main/res/layout/activity_post_image.xml index 1cf36a16..93cfcf2b 100644 --- a/app/src/main/res/layout/activity_post_image.xml +++ b/app/src/main/res/layout/activity_post_image.xml @@ -137,7 +137,7 @@ android:padding="16dp" android:hint="@string/post_title_hint" android:inputType="textCapSentences|textMultiLine" - android:textSize="?attr/font_18" + android:textSize="?attr/title_font_18" android:background="#00000000" android:textColor="@color/primaryTextColor" /> diff --git a/app/src/main/res/layout/activity_post_link.xml b/app/src/main/res/layout/activity_post_link.xml index 23374e78..a9e7c96d 100644 --- a/app/src/main/res/layout/activity_post_link.xml +++ b/app/src/main/res/layout/activity_post_link.xml @@ -137,7 +137,7 @@ android:padding="16dp" android:hint="@string/post_title_hint" android:inputType="textCapSentences|textMultiLine" - android:textSize="?attr/font_18" + android:textSize="?attr/title_font_18" android:background="#00000000" android:textColor="@color/primaryTextColor" /> @@ -154,7 +154,7 @@ android:padding="16dp" android:hint="@string/post_link_hint" android:inputType="textMultiLine" - android:textSize="?attr/font_18" + android:textSize="?attr/content_font_18" android:background="#00000000" android:textColor="@color/primaryTextColor" /> diff --git a/app/src/main/res/layout/activity_post_text.xml b/app/src/main/res/layout/activity_post_text.xml index b10266f1..dcb00c5c 100644 --- a/app/src/main/res/layout/activity_post_text.xml +++ b/app/src/main/res/layout/activity_post_text.xml @@ -137,7 +137,7 @@ android:padding="16dp" android:hint="@string/post_title_hint" android:inputType="textCapSentences|textMultiLine" - android:textSize="?attr/font_18" + android:textSize="?attr/title_font_18" android:background="#00000000" android:textColor="@color/primaryTextColor" /> @@ -154,7 +154,7 @@ android:padding="16dp" android:hint="@string/post_text_content_hint" android:inputType="textCapSentences|textMultiLine" - android:textSize="?attr/font_18" + android:textSize="?attr/content_font_18" android:background="#00000000" android:textColor="@color/primaryTextColor" /> diff --git a/app/src/main/res/layout/activity_post_video.xml b/app/src/main/res/layout/activity_post_video.xml index 086c63b8..9510db6b 100644 --- a/app/src/main/res/layout/activity_post_video.xml +++ b/app/src/main/res/layout/activity_post_video.xml @@ -137,7 +137,7 @@ android:padding="16dp" android:hint="@string/post_title_hint" android:inputType="textCapSentences|textMultiLine" - android:textSize="?attr/font_18" + android:textSize="?attr/title_font_18" android:background="#00000000" android:textColor="@color/primaryTextColor" /> diff --git a/app/src/main/res/layout/dialog_edit_flair.xml b/app/src/main/res/layout/dialog_edit_flair.xml index 5872be15..55efc339 100644 --- a/app/src/main/res/layout/dialog_edit_flair.xml +++ b/app/src/main/res/layout/dialog_edit_flair.xml @@ -10,6 +10,7 @@ android:layout_margin="24dp" android:background="#00000000" android:textColor="@color/primaryTextColor" + android:textSize="?attr/font_default" android:hint="@string/flair" android:maxLength="64" /> diff --git a/app/src/main/res/layout/item_comment.xml b/app/src/main/res/layout/item_comment.xml index c286738a..1cac0a70 100644 --- a/app/src/main/res/layout/item_comment.xml +++ b/app/src/main/res/layout/item_comment.xml @@ -59,7 +59,7 @@ android:layout_marginEnd="32dp" android:layout_marginBottom="8dp" android:textColor="@color/primaryTextColor" - android:textSize="?attr/font_default" /> + android:textSize="?attr/content_font_default" /> <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" diff --git a/app/src/main/res/layout/item_post.xml b/app/src/main/res/layout/item_post.xml index 3de19829..058d53ae 100644 --- a/app/src/main/res/layout/item_post.xml +++ b/app/src/main/res/layout/item_post.xml @@ -79,7 +79,7 @@ android:layout_height="wrap_content" android:paddingStart="16dp" android:paddingEnd="16dp" - android:textSize="?attr/font_18" + android:textSize="?attr/title_font_18" android:textColor="@color/primaryTextColor"/> <androidx.constraintlayout.widget.ConstraintLayout diff --git a/app/src/main/res/layout/item_post_detail.xml b/app/src/main/res/layout/item_post_detail.xml index c6dff0a7..09a99591 100644 --- a/app/src/main/res/layout/item_post_detail.xml +++ b/app/src/main/res/layout/item_post_detail.xml @@ -73,7 +73,7 @@ android:paddingStart="16dp" android:paddingEnd="16dp" android:textColor="@color/primaryTextColor" - android:textSize="?attr/font_18" /> + android:textSize="?attr/title_font_18" /> <TextView android:id="@+id/content_markdown_view_item_post_detail" @@ -83,7 +83,7 @@ android:paddingEnd="16dp" android:layout_marginTop="16dp" android:visibility="gone" - android:textSize="?attr/font_default" /> + android:textSize="?attr/content_font_default" /> <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" diff --git a/app/src/main/res/layout/item_rule.xml b/app/src/main/res/layout/item_rule.xml index 652d53b0..5230295c 100644 --- a/app/src/main/res/layout/item_rule.xml +++ b/app/src/main/res/layout/item_rule.xml @@ -9,7 +9,7 @@ android:layout_height="wrap_content" android:padding="16dp" android:textColor="@color/primaryTextColor" - android:textSize="?attr/font_16" /> + android:textSize="?attr/title_font_16" /> <TextView android:id="@+id/description_markwon_view_item_rule" @@ -18,6 +18,6 @@ android:paddingBottom="16dp" android:paddingStart="16dp" android:paddingEnd="16dp" - android:textSize="?attr/font_default" /> + android:textSize="?attr/content_font_default" /> </LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 43b955c8..f50fe519 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -70,4 +70,34 @@ <item>Large</item> <item>XLarge</item> </string-array> + + <string-array name="settings_title_font_size"> + <item>Small</item> + <item>Normal</item> + <item>Large</item> + <item>Extra Large</item> + </string-array> + + <string-array name="settings_title_font_size_values"> + <item>Small</item> + <item>Normal</item> + <item>Large</item> + <item>XLarge</item> + </string-array> + + <string-array name="settings_content_font_size"> + <item>Small</item> + <item>Normal</item> + <item>Large</item> + <item>Extra Large</item> + <item>Enormous Large</item> + </string-array> + + <string-array name="settings_content_font_size_values"> + <item>Small</item> + <item>Normal</item> + <item>Large</item> + <item>XLarge</item> + <item>XXLarge</item> + </string-array> </resources>
\ No newline at end of file diff --git a/app/src/main/res/values/attr.xml b/app/src/main/res/values/attr.xml index 64aa4b9e..201074bd 100644 --- a/app/src/main/res/values/attr.xml +++ b/app/src/main/res/values/attr.xml @@ -9,4 +9,20 @@ <attr name="font_18" format="dimension"/> <attr name="font_20" format="dimension"/> </declare-styleable> + + <declare-styleable name="TitleFontStyle"> + <attr name="title_font_default" format="dimension"/> + <attr name="title_font_12" format="dimension"/> + <attr name="title_font_16" format="dimension"/> + <attr name="title_font_18" format="dimension"/> + <attr name="title_font_20" format="dimension"/> + </declare-styleable> + + <declare-styleable name="ContentFontStyle"> + <attr name="content_font_default" format="dimension"/> + <attr name="content_font_12" format="dimension"/> + <attr name="content_font_16" format="dimension"/> + <attr name="content_font_18" format="dimension"/> + <attr name="content_font_20" format="dimension"/> + </declare-styleable> </resources>
\ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6d7b0153..e8cba1f9 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -275,6 +275,8 @@ <string name="settings_theme_system_default_summary">Device default</string> <string name="settings_lazy_mode_interval_title">Lazy Mode Interval</string> <string name="settings_font_size_title">Font Size</string> + <string name="settings_title_font_size_title">Title Font Size</string> + <string name="settings_content_font_size_title">Content Font Size</string> <string name="settings_enable_nsfw_title">Enable NSFW</string> <string name="settings_blur_nsfw_title">Blur NSFW images</string> <string name="settings_layout_no_limits_title">Display Under Navigation bar and Status Bar</string> diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index f066da89..2b6e10bb 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -85,8 +85,7 @@ <item name="android:textSize">?attr/font_default</item> </style> - <style name="FontStyle"> - </style> + <style name="FontStyle" /> <style name="FontStyle.Small"> <item name="font_default">12sp</item> @@ -120,4 +119,80 @@ <item name="font_20">24sp</item> </style> + <style name="TitleFontStyle" /> + + <style name="TitleFontStyle.Small"> + <item name="title_font_default">12sp</item> + <item name="title_font_12">12sp</item> + <item name="title_font_16">14sp</item> + <item name="title_font_18">16sp</item> + <item name="title_font_20">18sp</item> + </style> + + <style name="TitleFontStyle.Normal"> + <item name="title_font_default">14sp</item> + <item name="title_font_12">12sp</item> + <item name="title_font_16">16sp</item> + <item name="title_font_18">18sp</item> + <item name="title_font_20">20sp</item> + </style> + + <style name="TitleFontStyle.Large"> + <item name="font_default">16sp</item> + <item name="title_font_12">14sp</item> + <item name="title_font_16">18sp</item> + <item name="title_font_18">20sp</item> + <item name="title_font_20">22sp</item> + </style> + + <style name="TitleFontStyle.XLarge"> + <item name="title_font_default">18sp</item> + <item name="title_font_12">16sp</item> + <item name="title_font_16">20sp</item> + <item name="title_font_18">22sp</item> + <item name="title_font_20">24sp</item> + </style> + + <style name="ContentFontStyle" /> + + <style name="ContentFontStyle.Small"> + <item name="content_font_default">12sp</item> + <item name="content_font_12">12sp</item> + <item name="content_font_16">14sp</item> + <item name="content_font_18">16sp</item> + <item name="content_font_20">18sp</item> + </style> + + <style name="ContentFontStyle.Normal"> + <item name="content_font_default">14sp</item> + <item name="content_font_12">12sp</item> + <item name="content_font_16">16sp</item> + <item name="content_font_18">18sp</item> + <item name="content_font_20">20sp</item> + </style> + + <style name="ContentFontStyle.Large"> + <item name="content_font_default">16sp</item> + <item name="content_font_12">14sp</item> + <item name="content_font_16">18sp</item> + <item name="content_font_18">20sp</item> + <item name="content_font_20">22sp</item> + </style> + + <style name="ContentFontStyle.XLarge"> + <item name="content_font_default">18sp</item> + <item name="content_font_12">16sp</item> + <item name="content_font_16">20sp</item> + <item name="content_font_18">22sp</item> + <item name="content_font_20">24sp</item> + </style> + + <style name="ContentFontStyle.XXLarge"> + <item name="content_font_default">20sp</item> + <item name="content_font_12">18sp</item> + <item name="content_font_16">22sp</item> + <item name="content_font_18">24sp</item> + <item name="content_font_20">26sp</item> + </style> + </resources> diff --git a/app/src/main/res/xml/font_size_preferences.xml b/app/src/main/res/xml/font_size_preferences.xml new file mode 100644 index 00000000..40695b92 --- /dev/null +++ b/app/src/main/res/xml/font_size_preferences.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto"> + + <ListPreference + app:defaultValue="Normal" + android:entries="@array/settings_font_size" + app:entryValues="@array/settings_font_size_values" + app:key="font_size" + app:title="@string/settings_font_size_title" + app:useSimpleSummaryProvider="true" /> + + <ListPreference + app:defaultValue="Normal" + android:entries="@array/settings_title_font_size" + app:entryValues="@array/settings_title_font_size_values" + app:key="title_font_size" + app:title="@string/settings_title_font_size_title" + app:useSimpleSummaryProvider="true" /> + + <ListPreference + app:defaultValue="Normal" + android:entries="@array/settings_content_font_size" + app:entryValues="@array/settings_content_font_size_values" + app:key="content_font_size" + app:title="@string/settings_content_font_size_title" + app:useSimpleSummaryProvider="true" /> + +</PreferenceScreen>
\ No newline at end of file diff --git a/app/src/main/res/xml/main_preferences.xml b/app/src/main/res/xml/main_preferences.xml index e1f8a0a0..6567eb1b 100644 --- a/app/src/main/res/xml/main_preferences.xml +++ b/app/src/main/res/xml/main_preferences.xml @@ -24,13 +24,9 @@ app:title="@string/settings_lazy_mode_interval_title" app:useSimpleSummaryProvider="true" /> - <ListPreference - app:defaultValue="Normal" - android:entries="@array/settings_font_size" - app:entryValues="@array/settings_font_size_values" - app:key="font_size" + <Preference app:title="@string/settings_font_size_title" - app:useSimpleSummaryProvider="true" /> + app:fragment="Settings.FontSizePreferenceFragment" /> <SwitchPreference app:defaultValue="false" |