From 66bcd52e3142a475b56175fe1282b705bca2b534 Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Thu, 5 May 2022 11:44:21 +0600 Subject: [PATCH 1/6] Update compose mail button icon --- app/ui/legacy/src/main/res/drawable/ic_pencil.xml | 11 ++++++----- app/ui/legacy/src/main/res/values/colors.xml | 2 ++ app/ui/legacy/src/main/res/values/styles.xml | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/ui/legacy/src/main/res/drawable/ic_pencil.xml b/app/ui/legacy/src/main/res/drawable/ic_pencil.xml index b8a355eb03..9d95d5f4e1 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_pencil.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_pencil.xml @@ -1,9 +1,10 @@ + + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + android:pathData="M2.9988,17.2513V21.0013H6.7488L17.8088,9.9413L14.0588,6.1913L2.9988,17.2513ZM20.7088,7.0413C21.0988,6.6513 21.0988,6.0213 20.7088,5.6313L18.3688,3.2913C17.9788,2.9013 17.3488,2.9013 16.9588,3.2913L15.1288,5.1213L18.8788,8.8713L20.7088,7.0413Z" /> diff --git a/app/ui/legacy/src/main/res/values/colors.xml b/app/ui/legacy/src/main/res/values/colors.xml index 41d2f04c53..3568f8ac16 100644 --- a/app/ui/legacy/src/main/res/values/colors.xml +++ b/app/ui/legacy/src/main/res/values/colors.xml @@ -28,5 +28,7 @@ @lineageos.platform:color/color_default_divider @lineageos.platform:color/color_default_gray2 + @lineageos.platform:color/color_default_background + #145DB2FF diff --git a/app/ui/legacy/src/main/res/values/styles.xml b/app/ui/legacy/src/main/res/values/styles.xml index 2ea6ee4e45..a2365edd3d 100644 --- a/app/ui/legacy/src/main/res/values/styles.xml +++ b/app/ui/legacy/src/main/res/values/styles.xml @@ -48,7 +48,7 @@ + + \ No newline at end of file diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageCompose.java b/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageCompose.java index fd616150c3..53dd04ee09 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageCompose.java +++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageCompose.java @@ -413,9 +413,11 @@ public class MessageCompose extends K9Activity implements OnClickListener, if (account.isSignatureBeforeQuotedText()) { signatureView = upperSignature; lowerSignature.setVisibility(View.GONE); + findViewById(R.id.lower_signature_divider).setVisibility(View.GONE); } else { signatureView = lowerSignature; upperSignature.setVisibility(View.GONE); + findViewById(R.id.upper_signature_divider).setVisibility(View.GONE); } updateSignature(); signatureView.addTextChangedListener(signTextWatcher); diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/compose/QuotedMessageMvpView.java b/app/ui/legacy/src/main/java/com/fsck/k9/ui/compose/QuotedMessageMvpView.java index 4d7c9bd1d2..adcc5687dd 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/compose/QuotedMessageMvpView.java +++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/compose/QuotedMessageMvpView.java @@ -30,11 +30,11 @@ public class QuotedMessageMvpView { private final Button mQuotedTextShow; private final View mQuotedTextBar; - private final ImageButton mQuotedTextEdit; + private final View mQuotedTextEdit; private final EditText mQuotedText; private final MessageWebView mQuotedHTML; private final EditText mMessageContentView; - private final ImageButton mQuotedTextDelete; + private final View mQuotedTextDelete; public QuotedMessageMvpView(MessageCompose messageCompose) { diff --git a/app/ui/legacy/src/main/res/drawable/edittext_cursor.xml b/app/ui/legacy/src/main/res/drawable/edittext_cursor.xml new file mode 100644 index 0000000000..8f3f1ae237 --- /dev/null +++ b/app/ui/legacy/src/main/res/drawable/edittext_cursor.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/app/ui/legacy/src/main/res/drawable/ic_arrow_back.xml b/app/ui/legacy/src/main/res/drawable/ic_arrow_back.xml index cfe1e1a3d3..3704179240 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_arrow_back.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_arrow_back.xml @@ -4,6 +4,6 @@ android:viewportWidth="24" android:viewportHeight="24"> diff --git a/app/ui/legacy/src/main/res/drawable/ic_hamburger.xml b/app/ui/legacy/src/main/res/drawable/ic_hamburger.xml new file mode 100644 index 0000000000..69cbb5a177 --- /dev/null +++ b/app/ui/legacy/src/main/res/drawable/ic_hamburger.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/app/ui/legacy/src/main/res/drawable/ic_messagelist_attachment.xml b/app/ui/legacy/src/main/res/drawable/ic_messagelist_attachment.xml index 2b7070cde1..bc4e23627d 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_messagelist_attachment.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_messagelist_attachment.xml @@ -4,6 +4,6 @@ android:viewportWidth="24" android:viewportHeight="24"> + android:pathData="M19.0711,10.5859L10.9394,18.7176C9.3767,20.2803 6.8452,20.2803 5.2825,18.7176C3.7198,17.1549 3.7198,14.6234 5.2825,13.0607L14.1213,4.2219C15.0972,3.2461 16.6811,3.2461 17.6569,4.2219C18.6327,5.1977 18.6327,6.7816 17.6569,7.7574L10.2323,15.1821C9.8434,15.571 9.207,15.571 8.818,15.1821C8.4291,14.7931 8.4291,14.1567 8.818,13.7678L15.5356,7.0503L14.4749,5.9897L7.7574,12.7072C6.7816,13.683 6.7816,15.2669 7.7574,16.2427C8.7332,17.2185 10.3171,17.2185 11.2929,16.2427L18.7175,8.8181C20.2802,7.2554 20.2802,4.7239 18.7175,3.1612C17.1548,1.5985 14.6234,1.5985 13.0607,3.1612L4.2218,12.0001C2.0722,14.1497 2.0722,17.6286 4.2218,19.7782C6.3715,21.9279 9.8504,21.9279 12,19.7782L20.1318,11.6465L19.0711,10.5859Z" + android:fillColor="@color/default_icon_color"/> diff --git a/app/ui/legacy/src/main/res/layout/message_compose_content.xml b/app/ui/legacy/src/main/res/layout/message_compose_content.xml index 58c3ce9d4b..cc9ab02d47 100644 --- a/app/ui/legacy/src/main/res/layout/message_compose_content.xml +++ b/app/ui/legacy/src/main/res/layout/message_compose_content.xml @@ -33,8 +33,6 @@ android:imeOptions="actionNext|flagNoExtractUi" android:singleLine="true" android:background="@android:color/transparent" - android:paddingTop="10dp" - android:paddingBottom="10dp" style="@style/ComposeEditTextLarge" /> @@ -42,7 +40,7 @@ + android:background="@color/color_message_compose_common_divider" /> @@ -61,12 +59,25 @@ style="@style/ComposeEditTextLarge" tools:ignore="InefficientWeight" /> + + @@ -94,28 +106,40 @@ android:layout_alignParentTop="true" android:layout_alignParentEnd="true"> - + android:textColor="@color/color_default_primary_text" + android:background="@null" + android:textSize="14sp" + android:text="@string/edit" + android:padding="10dp" /> - + android:text="@string/clear" + android:textSize="14sp" + android:background="@null" + android:textColor="@color/color_default_primary_text" + android:padding="10dp" /> + + + android:layout_below="@id/quoted_text_buttons_divider"/> + + + + android:background="@color/color_message_compose_common_divider" /> + android:background="@color/color_message_compose_common_divider" /> + android:background="@color/color_message_compose_common_divider" /> + android:background="@color/color_message_compose_common_divider" /> + android:background="@color/color_message_compose_common_divider" /> diff --git a/app/ui/legacy/src/main/res/values-night/colors.xml b/app/ui/legacy/src/main/res/values-night/colors.xml new file mode 100644 index 0000000000..e7c803a100 --- /dev/null +++ b/app/ui/legacy/src/main/res/values-night/colors.xml @@ -0,0 +1,11 @@ + + + #121212 + #DEFFFFFF + #99FFFFFF + #61FFFFFF + + #6BFFFFFF + #14FFFFFF + #2e2e2e + \ No newline at end of file diff --git a/app/ui/legacy/src/main/res/values/colors.xml b/app/ui/legacy/src/main/res/values/colors.xml index 3568f8ac16..a188c107bd 100644 --- a/app/ui/legacy/src/main/res/values/colors.xml +++ b/app/ui/legacy/src/main/res/values/colors.xml @@ -21,13 +21,18 @@ @lineageos.platform:color/color_default_primary @lineageos.platform:color/color_default_primary_dark @lineageos.platform:color/color_default_accent - @lineageos.platform:color/color_default_background + @android:color/white @lineageos.platform:color/color_default_foreground - @lineageos.platform:color/color_default_primary_text - @lineageos.platform:color/color_default_secondary_text + #DE000000 + #99000000 + #61000000 @lineageos.platform:color/color_default_divider @lineageos.platform:color/color_default_gray2 + #6B212121 + #14212121 + #f5f5f5 + @lineageos.platform:color/color_default_background #145DB2FF diff --git a/app/ui/legacy/src/main/res/values/strings.xml b/app/ui/legacy/src/main/res/values/strings.xml index 71ba646f06..79238b2826 100644 --- a/app/ui/legacy/src/main/res/values/strings.xml +++ b/app/ui/legacy/src/main/res/values/strings.xml @@ -206,7 +206,7 @@ Load more messages To:%s - Subject + Subject: Message text Signature -------- Original Message -------- @@ -1035,11 +1035,11 @@ *Encrypted* Add from Contacts - Cc - Bcc - To - From - Reply to + Cc: + Bcc: + To: + From: + Reply to: <Unknown Recipient> <Unknown Sender> Home @@ -1232,4 +1232,7 @@ You can keep this message and use it as a backup for your secret key. If you wan Mail is forked from k9 Mail Privacy policy Terms of service + + EDIT + CLEAR diff --git a/app/ui/legacy/src/main/res/values/styles.xml b/app/ui/legacy/src/main/res/values/styles.xml index a2365edd3d..6d95f97556 100644 --- a/app/ui/legacy/src/main/res/values/styles.xml +++ b/app/ui/legacy/src/main/res/values/styles.xml @@ -2,19 +2,24 @@ \ No newline at end of file diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/SettingsActivity.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/SettingsActivity.kt index 1fc0e6474c..12026c34bb 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/SettingsActivity.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/SettingsActivity.kt @@ -2,7 +2,11 @@ package com.fsck.k9.ui.settings import android.app.Activity import android.content.Intent +import android.graphics.PorterDuff +import android.graphics.PorterDuffColorFilter import android.os.Bundle +import androidx.appcompat.widget.Toolbar +import androidx.core.content.ContextCompat import androidx.navigation.NavController import androidx.navigation.ui.AppBarConfiguration import androidx.navigation.ui.setupActionBarWithNavController @@ -26,6 +30,8 @@ class SettingsActivity : K9Activity() { navController = findNavController(R.id.nav_host_fragment) setupActionBarWithNavController(navController, appBarConfiguration) + val toolbar = findViewById(R.id.toolbar) + toolbar.navigationIcon?.mutate()?.colorFilter = PorterDuffColorFilter(ContextCompat.getColor(this, R.color.color_default_primary_text), PorterDuff.Mode.SRC_OVER) } override fun onSupportNavigateUp(): Boolean { diff --git a/app/ui/legacy/src/main/res/drawable/ic_cog.xml b/app/ui/legacy/src/main/res/drawable/ic_cog.xml index 5764b3c420..762da9796a 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_cog.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_cog.xml @@ -1,9 +1,9 @@ + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + android:fillColor="@color/default_icon_color" + android:pathData="M19.4323,12.98C19.4723,12.66 19.5023,12.34 19.5023,12C19.5023,11.66 19.4723,11.34 19.4323,11.02L21.5423,9.37C21.7323,9.22 21.7823,8.95 21.6623,8.73L19.6623,5.27C19.5723,5.11 19.4023,5.02 19.2223,5.02C19.1623,5.02 19.1023,5.03 19.0523,5.05L16.5623,6.05C16.0423,5.65 15.4823,5.32 14.8723,5.07L14.4923,2.42C14.4623,2.18 14.2523,2 14.0023,2H10.0023C9.7523,2 9.5423,2.18 9.5123,2.42L9.1323,5.07C8.5223,5.32 7.9623,5.66 7.4423,6.05L4.9523,5.05C4.8923,5.03 4.8323,5.02 4.7723,5.02C4.6023,5.02 4.4323,5.11 4.3423,5.27L2.3423,8.73C2.2123,8.95 2.2723,9.22 2.4623,9.37L4.5723,11.02C4.5323,11.34 4.5023,11.67 4.5023,12C4.5023,12.33 4.5323,12.66 4.5723,12.98L2.4623,14.63C2.2723,14.78 2.2223,15.05 2.3423,15.27L4.3423,18.73C4.4323,18.89 4.6023,18.98 4.7823,18.98C4.8423,18.98 4.9023,18.97 4.9523,18.95L7.4423,17.95C7.9623,18.35 8.5223,18.68 9.1323,18.93L9.5123,21.58C9.5423,21.82 9.7523,22 10.0023,22H14.0023C14.2523,22 14.4623,21.82 14.4923,21.58L14.8723,18.93C15.4823,18.68 16.0423,18.34 16.5623,17.95L19.0523,18.95C19.1123,18.97 19.1723,18.98 19.2323,18.98C19.4023,18.98 19.5723,18.89 19.6623,18.73L21.6623,15.27C21.7823,15.05 21.7323,14.78 21.5423,14.63L19.4323,12.98ZM17.4523,11.27C17.4923,11.58 17.5023,11.79 17.5023,12C17.5023,12.21 17.4823,12.43 17.4523,12.73L17.3123,13.86L18.2023,14.56L19.2823,15.4L18.5823,16.61L17.3123,16.1L16.2723,15.68L15.3723,16.36C14.9423,16.68 14.5323,16.92 14.1223,17.09L13.0623,17.52L12.9023,18.65L12.7023,20H11.3023L10.9523,17.52L9.8923,17.09C9.4623,16.91 9.0623,16.68 8.6623,16.38L7.7523,15.68L6.6923,16.11L5.4223,16.62L4.7223,15.41L5.8023,14.57L6.6923,13.87L6.5523,12.74C6.5223,12.43 6.5023,12.2 6.5023,12C6.5023,11.8 6.5223,11.57 6.5523,11.27L6.6923,10.14L5.8023,9.44L4.7223,8.6L5.4223,7.39L6.6923,7.9L7.7323,8.32L8.6323,7.64C9.0623,7.32 9.4723,7.08 9.8823,6.91L10.9423,6.48L11.1023,5.35L11.3023,4H12.6923L13.0423,6.48L14.1023,6.91C14.5323,7.09 14.9323,7.32 15.3323,7.62L16.2423,8.32L17.3023,7.89L18.5723,7.38L19.2723,8.59L18.2023,9.44L17.3123,10.14L17.4523,11.27ZM12.0023,8C9.7923,8 8.0023,9.79 8.0023,12C8.0023,14.21 9.7923,16 12.0023,16C14.2123,16 16.0023,14.21 16.0023,12C16.0023,9.79 14.2123,8 12.0023,8ZM12.0023,14C10.9023,14 10.0023,13.1 10.0023,12C10.0023,10.9 10.9023,10 12.0023,10C13.1023,10 14.0023,10.9 14.0023,12C14.0023,13.1 13.1023,14 12.0023,14Z" /> diff --git a/app/ui/legacy/src/main/res/drawable/ic_download.xml b/app/ui/legacy/src/main/res/drawable/ic_download.xml index d15cd4d397..c1ba721fcd 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_download.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_download.xml @@ -5,5 +5,5 @@ android:viewportHeight="24"> + android:pathData="M5,20.5H19V18.5H5V20.5ZM19,9.5H15V3.5H9V9.5H5L12,16.5L19,9.5Z" /> diff --git a/app/ui/legacy/src/main/res/drawable/ic_envelope.xml b/app/ui/legacy/src/main/res/drawable/ic_envelope.xml index a73e24c519..829c3a7e22 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_envelope.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_envelope.xml @@ -1,9 +1,9 @@ + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + android:pathData="M22,6C22,4.9 21.1,4 20,4H4C2.9,4 2,4.9 2,6V18C2,19.1 2.9,20 4,20H20C21.1,20 22,19.1 22,18V6ZM20,6L12,10.99L4,6H20ZM20,18H4V8L12,13L20,8V18Z" /> diff --git a/app/ui/legacy/src/main/res/drawable/ic_export.xml b/app/ui/legacy/src/main/res/drawable/ic_export.xml index fdad795cd2..a9366ac20b 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_export.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_export.xml @@ -3,7 +3,7 @@ android:height="24dp" android:viewportWidth="24" android:viewportHeight="24"> - + diff --git a/app/ui/legacy/src/main/res/drawable/ic_import.xml b/app/ui/legacy/src/main/res/drawable/ic_import.xml index eb0579fd2d..501ccd29b4 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_import.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_import.xml @@ -5,5 +5,5 @@ android:viewportHeight="24"> + android:pathData="M5,20.5H19V18.5H5V20.5ZM19,9.5H15V3.5H9V9.5H5L12,16.5L19,9.5Z" /> diff --git a/app/ui/legacy/src/main/res/drawable/ic_info.xml b/app/ui/legacy/src/main/res/drawable/ic_info.xml index 31a1cfb466..2441ea19a3 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_info.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_info.xml @@ -5,5 +5,5 @@ android:viewportHeight="24"> + android:pathData="M11,7H13V9H11V7ZM11,11H13V17H11V11ZM12,2C6.48,2 2,6.48 2,12C2,17.52 6.48,22 12,22C17.52,22 22,17.52 22,12C22,6.48 17.52,2 12,2ZM12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20Z" /> diff --git a/app/ui/legacy/src/main/res/drawable/ic_plus.xml b/app/ui/legacy/src/main/res/drawable/ic_plus.xml index a6974cf515..d8ce14fbcb 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_plus.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_plus.xml @@ -5,5 +5,5 @@ android:viewportHeight="24"> + android:pathData="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z" /> diff --git a/app/ui/legacy/src/main/res/drawable/ic_star.xml b/app/ui/legacy/src/main/res/drawable/ic_star.xml index 71c9c883e3..e24f209f19 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_star.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_star.xml @@ -2,9 +2,8 @@ android:width="24dp" android:height="24dp" android:viewportWidth="24" -android:viewportHeight="24" -android:tint="?attr/messageStarColor"> +android:viewportHeight="24" > diff --git a/app/ui/legacy/src/main/res/layout/account_list_item.xml b/app/ui/legacy/src/main/res/layout/account_list_item.xml index 9437333e2c..d34d78c272 100644 --- a/app/ui/legacy/src/main/res/layout/account_list_item.xml +++ b/app/ui/legacy/src/main/res/layout/account_list_item.xml @@ -12,15 +12,13 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_vertical" - android:orientation="horizontal" - android:paddingStart="8dp" - android:paddingEnd="0dp"> + android:orientation="horizontal"> + android:layout_margin="16dp"> diff --git a/app/ui/legacy/src/main/res/layout/activity_account_settings.xml b/app/ui/legacy/src/main/res/layout/activity_account_settings.xml index 50494fbf33..f94910f4ce 100644 --- a/app/ui/legacy/src/main/res/layout/activity_account_settings.xml +++ b/app/ui/legacy/src/main/res/layout/activity_account_settings.xml @@ -10,8 +10,9 @@ android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" - android:background="?attr/colorPrimary" + android:background="@color/color_default_primary_dark" android:elevation="4dp" + android:theme="@style/ToolbarTheme" tools:navigationIcon="@drawable/ic_arrow_back"> -- GitLab From 1aa7d7c841d1426d056cd13e355d11a4a1daa59a Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Thu, 5 May 2022 23:47:12 +0600 Subject: [PATCH 5/6] Update star button color --- app/ui/legacy/src/main/res/drawable/ic_star.xml | 14 +++++++------- .../src/main/res/drawable/ic_star_border.xml | 4 ++-- .../main/res/layout/message_compose_content.xml | 2 -- .../src/main/res/layout/message_list_item.xml | 1 - 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/app/ui/legacy/src/main/res/drawable/ic_star.xml b/app/ui/legacy/src/main/res/drawable/ic_star.xml index e24f209f19..c879c6d16a 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_star.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_star.xml @@ -1,9 +1,9 @@ - + android:width="16dp" + android:height="16dp" + android:viewportWidth="16" + android:viewportHeight="16"> + diff --git a/app/ui/legacy/src/main/res/drawable/ic_star_border.xml b/app/ui/legacy/src/main/res/drawable/ic_star_border.xml index 91b67b6b73..34a32a725f 100644 --- a/app/ui/legacy/src/main/res/drawable/ic_star_border.xml +++ b/app/ui/legacy/src/main/res/drawable/ic_star_border.xml @@ -1,6 +1,6 @@ Date: Fri, 6 May 2022 01:28:13 +0600 Subject: [PATCH 6/6] Fix preferenceCategory style --- .../ui/settings/CustomPreferenceCategory.java | 43 +++++++++++++++++++ .../res/layout/text_divider_list_item.xml | 7 +-- .../src/main/res/xml/account_settings.xml | 4 +- .../res/xml/folder_settings_preferences.xml | 4 +- .../src/main/res/xml/general_settings.xml | 36 ++++++++-------- 5 files changed, 69 insertions(+), 25 deletions(-) create mode 100644 app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/CustomPreferenceCategory.java diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/CustomPreferenceCategory.java b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/CustomPreferenceCategory.java new file mode 100644 index 0000000000..6bde0b466e --- /dev/null +++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/CustomPreferenceCategory.java @@ -0,0 +1,43 @@ +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)); + } +} diff --git a/app/ui/legacy/src/main/res/layout/text_divider_list_item.xml b/app/ui/legacy/src/main/res/layout/text_divider_list_item.xml index 2dda903e06..b7da052ff4 100644 --- a/app/ui/legacy/src/main/res/layout/text_divider_list_item.xml +++ b/app/ui/legacy/src/main/res/layout/text_divider_list_item.xml @@ -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" /> diff --git a/app/ui/legacy/src/main/res/xml/account_settings.xml b/app/ui/legacy/src/main/res/xml/account_settings.xml index 79c14ba101..1c3e0d12f7 100644 --- a/app/ui/legacy/src/main/res/xml/account_settings.xml +++ b/app/ui/legacy/src/main/res/xml/account_settings.xml @@ -357,7 +357,7 @@ android:summary="@string/account_settings_notify_sync_summary" android:title="@string/account_settings_notify_sync_label" /> - @@ -371,7 +371,7 @@ android:summary="@string/account_settings_open_notification_settings_miscellaneous_summary" android:title="@string/notification_channel_miscellaneous_title" /> - + - - + diff --git a/app/ui/legacy/src/main/res/xml/general_settings.xml b/app/ui/legacy/src/main/res/xml/general_settings.xml index bbe1b098bc..ff6eadb6ea 100644 --- a/app/ui/legacy/src/main/res/xml/general_settings.xml +++ b/app/ui/legacy/src/main/res/xml/general_settings.xml @@ -13,7 +13,7 @@ android:title="@string/display_preferences" search:ignore="true"> - @@ -62,7 +62,7 @@ android:summary="@string/font_size_settings_description" android:title="@string/font_size_settings_title"> - @@ -82,9 +82,9 @@ android:entryValues="@array/font_values" android:dialogTitle="@string/font_size_account_description" /> - + - @@ -104,9 +104,9 @@ android:entryValues="@array/font_values" android:dialogTitle="@string/font_size_folder_status" /> - + - @@ -142,9 +142,9 @@ android:entryValues="@array/font_values" android:dialogTitle="@string/font_size_message_list_preview" /> - + - @@ -211,9 +211,9 @@ app:min="40" android:max="250" /> - + - @@ -225,7 +225,7 @@ android:entryValues="@array/font_values" android:dialogTitle="@string/font_size_message_compose_input" /> - + @@ -234,9 +234,9 @@ android:summary="@string/animations_summary" android:title="@string/animations_title" /> - + - @@ -248,9 +248,9 @@ android:key="show_starred_count" android:title="@string/show_starred_count_title" /> - + - @@ -324,9 +324,9 @@ app:useSimpleSummaryProvider="true" android:title="@string/global_settings_splitview_mode_label" /> - + - @@ -348,7 +348,7 @@ android:summary="@string/global_settings_messageview_autofit_width_summary" android:title="@string/global_settings_messageview_autofit_width_label" /> - + -- GitLab