mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-10-05 21:39:50 +02:00
Add title and content font size options.
This commit is contained in:
@@ -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" />
|
||||
|
||||
|
@@ -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" />
|
||||
|
@@ -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" />
|
||||
|
||||
|
@@ -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" />
|
||||
|
||||
|
@@ -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" />
|
||||
|
||||
|
@@ -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" />
|
||||
|
||||
|
@@ -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" />
|
||||
|
||||
|
@@ -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" />
|
||||
|
||||
|
@@ -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"
|
||||
|
@@ -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
|
||||
|
@@ -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"
|
||||
|
@@ -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>
|
@@ -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>
|
@@ -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>
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
29
app/src/main/res/xml/font_size_preferences.xml
Normal file
29
app/src/main/res/xml/font_size_preferences.xml
Normal file
@@ -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>
|
@@ -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"
|
||||
|
Reference in New Issue
Block a user