Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd530170 authored by Fahim Salam Chowdhury's avatar Fahim Salam Chowdhury 👽
Browse files

Fix preferenceCategory style

parent 1aa7d7c8
Loading
Loading
Loading
Loading
Loading
+43 −0
Original line number Diff line number Diff line
package com.fsck.k9.ui.settings;


import android.content.Context;
import android.util.AttributeSet;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import androidx.preference.PreferenceCategory;
import androidx.preference.PreferenceViewHolder;
import com.fsck.k9.ui.R;


public class CustomPreferenceCategory extends PreferenceCategory {

    public CustomPreferenceCategory(@NonNull Context context,
            @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
    }

    public CustomPreferenceCategory(@NonNull Context context,
            @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    public CustomPreferenceCategory(@NonNull Context context,
            @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public CustomPreferenceCategory(@NonNull Context context) {
        super(context);
    }

    @Override
    public void onBindViewHolder(@NonNull PreferenceViewHolder holder) {
        super.onBindViewHolder(holder);
        final TextView titleView = (TextView) holder.findViewById(android.R.id.title);
        titleView.setTextColor(ContextCompat.getColor(getContext(), R.color.color_default_primary_text));
    }
}
+4 −3
Original line number Diff line number Diff line
@@ -7,12 +7,13 @@
    android:background="?android:attr/windowBackground"
    android:ellipsize="end"
    android:gravity="center_vertical"
    android:paddingBottom="4dp"
    android:paddingBottom="7dp"
    android:paddingLeft="16dp"
    android:paddingRight="16dp"
    android:paddingTop="4dp"
    android:paddingTop="7dp"
    android:singleLine="true"
    android:textAppearance="?android:attr/textAppearanceSmall"
    android:textColor="?attr/colorAccent"
    android:textColor="@color/color_default_primary_text"
    android:textSize="14sp"
    android:textStyle="bold"
    tools:text="Divider" />
+2 −2
Original line number Diff line number Diff line
@@ -357,7 +357,7 @@
            android:summary="@string/account_settings_notify_sync_summary"
            android:title="@string/account_settings_notify_sync_label" />

        <PreferenceCategory
        <com.fsck.k9.ui.settings.CustomPreferenceCategory
            android:key="notification_channels"
            android:title="@string/account_settings_notification_channels_label">

@@ -371,7 +371,7 @@
                android:summary="@string/account_settings_open_notification_settings_miscellaneous_summary"
                android:title="@string/notification_channel_miscellaneous_title" />

        </PreferenceCategory>
        </com.fsck.k9.ui.settings.CustomPreferenceCategory>
    </PreferenceScreen>

    <PreferenceScreen
+2 −2
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <PreferenceCategory
    <com.fsck.k9.ui.settings.CustomPreferenceCategory
        android:key="folder_settings">

        <CheckBoxPreference
@@ -62,6 +62,6 @@
            android:title="@string/folder_settings_include_in_integrated_inbox_label"
            android:summary="@string/folder_settings_include_in_integrated_inbox_summary" />

    </PreferenceCategory>
    </com.fsck.k9.ui.settings.CustomPreferenceCategory>

</PreferenceScreen>
+18 −18
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
        android:title="@string/display_preferences"
        search:ignore="true">

        <PreferenceCategory
        <com.fsck.k9.ui.settings.CustomPreferenceCategory
            android:key="global_preferences"
            android:title="@string/global_preferences">

@@ -62,7 +62,7 @@
                android:summary="@string/font_size_settings_description"
                android:title="@string/font_size_settings_title">

                <PreferenceCategory
                <com.fsck.k9.ui.settings.CustomPreferenceCategory
                    android:title="@string/font_size_account_list"
                    android:key="account_list_fonts">

@@ -82,9 +82,9 @@
                        android:entryValues="@array/font_values"
                        android:dialogTitle="@string/font_size_account_description" />

                </PreferenceCategory>
                </com.fsck.k9.ui.settings.CustomPreferenceCategory>

                <PreferenceCategory
                <com.fsck.k9.ui.settings.CustomPreferenceCategory
                    android:title="@string/font_size_folder_list"
                    android:key="folder_list_fonts">

@@ -104,9 +104,9 @@
                        android:entryValues="@array/font_values"
                        android:dialogTitle="@string/font_size_folder_status" />

                </PreferenceCategory>
                </com.fsck.k9.ui.settings.CustomPreferenceCategory>

                <PreferenceCategory
                <com.fsck.k9.ui.settings.CustomPreferenceCategory
                    android:title="@string/font_size_message_list"
                    android:key="message_list_fonts">

@@ -142,9 +142,9 @@
                        android:entryValues="@array/font_values"
                        android:dialogTitle="@string/font_size_message_list_preview" />

                </PreferenceCategory>
                </com.fsck.k9.ui.settings.CustomPreferenceCategory>

                <PreferenceCategory
                <com.fsck.k9.ui.settings.CustomPreferenceCategory
                    android:title="@string/font_size_message_view"
                    android:key="message_view_fonts">

@@ -211,9 +211,9 @@
                        app:min="40"
                        android:max="250" />

                </PreferenceCategory>
                </com.fsck.k9.ui.settings.CustomPreferenceCategory>

                <PreferenceCategory
                <com.fsck.k9.ui.settings.CustomPreferenceCategory
                    android:title="@string/font_size_message_compose"
                    android:key="message_compose_fonts">

@@ -225,7 +225,7 @@
                        android:entryValues="@array/font_values"
                        android:dialogTitle="@string/font_size_message_compose_input" />

                </PreferenceCategory>
                </com.fsck.k9.ui.settings.CustomPreferenceCategory>

            </PreferenceScreen>

@@ -234,9 +234,9 @@
                android:summary="@string/animations_summary"
                android:title="@string/animations_title" />

        </PreferenceCategory>
        </com.fsck.k9.ui.settings.CustomPreferenceCategory>

        <PreferenceCategory
        <com.fsck.k9.ui.settings.CustomPreferenceCategory
            android:key="accountlist_preferences"
            android:title="@string/accountlist_preferences">

@@ -248,9 +248,9 @@
                android:key="show_starred_count"
                android:title="@string/show_starred_count_title" />

        </PreferenceCategory>
        </com.fsck.k9.ui.settings.CustomPreferenceCategory>

        <PreferenceCategory
        <com.fsck.k9.ui.settings.CustomPreferenceCategory
            android:key="messagelist_preferences"
            android:title="@string/messagelist_preferences">

@@ -324,9 +324,9 @@
                app:useSimpleSummaryProvider="true"
                android:title="@string/global_settings_splitview_mode_label" />

        </PreferenceCategory>
        </com.fsck.k9.ui.settings.CustomPreferenceCategory>

        <PreferenceCategory
        <com.fsck.k9.ui.settings.CustomPreferenceCategory
            android:key="messageview_preferences"
            android:title="@string/messageview_preferences">

@@ -348,7 +348,7 @@
                android:summary="@string/global_settings_messageview_autofit_width_summary"
                android:title="@string/global_settings_messageview_autofit_width_label" />

        </PreferenceCategory>
        </com.fsck.k9.ui.settings.CustomPreferenceCategory>

    </PreferenceScreen>