From a18652b655edfbf24ac5b4a2935af0f879180afa Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 18 Jan 2024 14:38:54 +0100 Subject: [PATCH] Use fixed RecyclerView everywhere --- .../java/eu/faircode/email/FixedRecyclerView.java | 11 +++++++++++ app/src/main/res/layout/activity_eml.xml | 2 +- app/src/main/res/layout/activity_setup.xml | 2 +- app/src/main/res/layout/dialog_keyword_manage.xml | 2 +- app/src/main/res/layout/dialog_rule_match.xml | 2 +- app/src/main/res/layout/dialog_virus_total.xml | 2 +- app/src/main/res/layout/fragment_accounts.xml | 2 +- app/src/main/res/layout/fragment_answers.xml | 2 +- app/src/main/res/layout/fragment_certificates.xml | 2 +- app/src/main/res/layout/fragment_compose.xml | 2 +- app/src/main/res/layout/fragment_contacts.xml | 2 +- app/src/main/res/layout/fragment_identities.xml | 2 +- app/src/main/res/layout/fragment_logs.xml | 2 +- app/src/main/res/layout/fragment_operations.xml | 2 +- app/src/main/res/layout/fragment_options_privacy.xml | 2 +- .../main/res/layout/fragment_options_synchronize.xml | 4 ++-- app/src/main/res/layout/fragment_order.xml | 2 +- app/src/main/res/layout/fragment_rules.xml | 2 +- .../main/res/layout/include_message_attachments.xml | 2 +- app/src/main/res/layout/include_message_images.xml | 2 +- app/src/main/res/layout/include_nav.xml | 10 +++++----- 21 files changed, 36 insertions(+), 25 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FixedRecyclerView.java b/app/src/main/java/eu/faircode/email/FixedRecyclerView.java index 14c96e2206..20961f3f74 100644 --- a/app/src/main/java/eu/faircode/email/FixedRecyclerView.java +++ b/app/src/main/java/eu/faircode/email/FixedRecyclerView.java @@ -59,6 +59,17 @@ public class FixedRecyclerView extends RecyclerView { .getDrawable(androidx.recyclerview.R.styleable.RecyclerView_fastScrollHorizontalThumbDrawable); Drawable horizontalTrackDrawable = a .getDrawable(androidx.recyclerview.R.styleable.RecyclerView_fastScrollHorizontalTrackDrawable); + + if (verticalThumbDrawable == null) + verticalThumbDrawable = (StateListDrawable) context.getDrawable(R.drawable.scroll_thumb); + if (verticalTrackDrawable == null) + verticalTrackDrawable = context.getDrawable(R.drawable.scroll_track); + + if (horizontalThumbDrawable == null) + horizontalThumbDrawable = (StateListDrawable) context.getDrawable(R.drawable.scroll_thumb); + if (horizontalTrackDrawable == null) + horizontalTrackDrawable = context.getDrawable(R.drawable.scroll_track); + Resources resources = getContext().getResources(); new FastScrollerEx(this, verticalThumbDrawable, verticalTrackDrawable, horizontalThumbDrawable, horizontalTrackDrawable, diff --git a/app/src/main/res/layout/activity_eml.xml b/app/src/main/res/layout/activity_eml.xml index e5cefae078..971cec442c 100644 --- a/app/src/main/res/layout/activity_eml.xml +++ b/app/src/main/res/layout/activity_eml.xml @@ -227,7 +227,7 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tvSubject" /> - - - - - - - - - - - - - - - - - - - - - - - - -