From 09c7aa2d0abdb315f321f2f3e7194f3c516e3f3d Mon Sep 17 00:00:00 2001 From: Andy Scherzinger Date: Wed, 7 Jun 2023 15:20:57 +0200 Subject: [PATCH] move timestamp below message, move buttons back to the left Signed-off-by: Andy Scherzinger --- .../ui/adapter/NotificationListAdapter.java | 14 ++++++++++- .../res/layout/notification_list_item.xml | 25 +++++++++---------- app/src/main/res/values/dims.xml | 2 +- 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/ui/adapter/NotificationListAdapter.java b/app/src/main/java/com/owncloud/android/ui/adapter/NotificationListAdapter.java index 4ece6391f5..04f84d037f 100644 --- a/app/src/main/java/com/owncloud/android/ui/adapter/NotificationListAdapter.java +++ b/app/src/main/java/com/owncloud/android/ui/adapter/NotificationListAdapter.java @@ -36,6 +36,7 @@ import android.text.style.ForegroundColorSpan; import android.text.style.StyleSpan; import android.view.Gravity; import android.view.LayoutInflater; +import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; @@ -144,7 +145,12 @@ public class NotificationListAdapter extends RecyclerView.Adapter overflowActions = new ArrayList<>(); + if (notification.getActions().size() > 0) { + holder.binding.buttons.setVisibility(View.VISIBLE); + } else { + holder.binding.buttons.setVisibility(View.GONE); + } + if (notification.getActions().size() > 2) { for (Action action : notification.getActions()) { if (action.primary) { diff --git a/app/src/main/res/layout/notification_list_item.xml b/app/src/main/res/layout/notification_list_item.xml index 9c55184e30..8e6bb8e30e 100644 --- a/app/src/main/res/layout/notification_list_item.xml +++ b/app/src/main/res/layout/notification_list_item.xml @@ -23,7 +23,6 @@ along with this program. If not, see . --> + + - - diff --git a/app/src/main/res/values/dims.xml b/app/src/main/res/values/dims.xml index c7c682e1aa..120e68d4fc 100644 --- a/app/src/main/res/values/dims.xml +++ b/app/src/main/res/values/dims.xml @@ -100,7 +100,7 @@ 48dp 24dp 24dp - 22dp + 21dp -8dp 1dp 40dp