From feee6589aa67cebe8bb73b4f6d3fa751065bf58f Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 18 Oct 2019 19:35:40 +0200 Subject: [PATCH] Message header layout improvements --- app/build.gradle | 2 +- .../eu/faircode/email/AdapterMessage.java | 98 ++++++++++------ .../res/layout/include_message_addresses.xml | 59 +++++++++- .../res/layout/include_message_compact.xml | 107 +++++++---------- .../res/layout/include_message_normal.xml | 108 ++++++++---------- app/src/main/res/values/strings.xml | 2 + 6 files changed, 210 insertions(+), 166 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index a3e24a24c1..ecefd737e7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -154,7 +154,7 @@ repositories { jcenter() maven { url "https://repo1.maven.org/maven2/" } maven { url "https://jitpack.io" } - maven { url "https://oss.sonatype.org/content/repositories/snapshots"} + maven { url "https://oss.sonatype.org/content/repositories/snapshots" } } configurations.all { diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index 96a848626d..4342caa6e7 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -257,22 +257,20 @@ public class AdapterMessage extends RecyclerView.Adapter 0 ? R.drawable.baseline_edit_24 @@ -797,13 +800,8 @@ public class AdapterMessage extends RecyclerView.Adapter 0 ? View.VISIBLE : View.GONE); if (viewType == ViewType.FOLDER) @@ -813,9 +811,7 @@ public class AdapterMessage extends RecyclerView.Adapter 0); boolean hasChannel = (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O); + ivPlain.setVisibility(show_addresses && message.plain_only != null && message.plain_only ? View.VISIBLE : View.GONE); + ivReceipt.setVisibility(show_addresses && message.receipt_request != null && message.receipt_request ? View.VISIBLE : View.GONE); + ivBrowsed.setVisibility(show_addresses && message.ui_browsed ? View.VISIBLE : View.GONE); + ibSearchContact.setVisibility(show_addresses && (hasFrom || hasTo) ? View.VISIBLE : View.GONE); ibNotifyContact.setVisibility(show_addresses && hasChannel && hasFrom ? View.VISIBLE : View.GONE); ibAddContact.setVisibility(show_addresses && contacts && hasFrom ? View.VISIBLE : View.GONE); @@ -1114,6 +1133,10 @@ public class AdapterMessage extends RecyclerView.Adapter + + + + + + + + + + + tvTimeExTitle,tvSizeExTitle, + tvFolderExTitle" /> + app:layout_constraintTop_toBottomOf="@id/tvFolderEx" /> + + + + - - - - - - - - - - @@ -272,6 +239,20 @@ app:layout_constraintTop_toBottomOf="@id/paddingTop" app:srcCompat="@drawable/baseline_star_24" /> + + + app:layout_constraintTop_toBottomOf="@id/tvExpand" /> + + + + - - - - - - - - - - @@ -265,6 +232,21 @@ app:layout_constraintTop_toTopOf="@+id/tvFolder" app:srcCompat="@drawable/baseline_message_24" /> + + + app:layout_constraintTop_toBottomOf="@id/tvExpand" /> Help improve FairEmail Send error reports? Error reporting will help improve FairEmail + Expanding this message will download %1$s Downloading … Compose @@ -601,6 +602,7 @@ Via: Received: Size: + Folder: Subject: Your message Discard