From 1da8c3b206be3e5cd1e3596c070fa672f869d1b1 Mon Sep 17 00:00:00 2001 From: Marcel Hibbe Date: Thu, 24 Feb 2022 12:31:58 +0100 Subject: [PATCH] modify StatusDrawable and use it for conversationList Signed-off-by: Marcel Hibbe --- .../talk/adapters/items/ConversationItem.java | 39 +++++------------ .../com/nextcloud/talk/ui/StatusDrawable.java | 43 ++++++++----------- .../dialog/ChooseAccountDialogFragment.java | 1 + .../talk/ui/dialog/SetStatusDialogFragment.kt | 2 +- app/src/main/res/drawable/online_status.xml | 17 ++++++-- .../main/res/layout/current_account_item.xml | 1 + ...rv_item_conversation_with_last_message.xml | 20 ++------- app/src/main/res/values-night/colors.xml | 2 + app/src/main/res/values/colors.xml | 4 ++ 9 files changed, 55 insertions(+), 74 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/adapters/items/ConversationItem.java b/app/src/main/java/com/nextcloud/talk/adapters/items/ConversationItem.java index 1a9be11b0..0de0a2413 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/items/ConversationItem.java +++ b/app/src/main/java/com/nextcloud/talk/adapters/items/ConversationItem.java @@ -48,6 +48,7 @@ import com.nextcloud.talk.models.json.chat.ChatMessage; import com.nextcloud.talk.models.json.conversations.Conversation; import com.nextcloud.talk.models.json.status.Status; import com.nextcloud.talk.models.json.status.StatusType; +import com.nextcloud.talk.ui.StatusDrawable; import com.nextcloud.talk.utils.ApiUtils; import com.nextcloud.talk.utils.DisplayUtils; @@ -70,6 +71,7 @@ import eu.davidea.viewholders.FlexibleViewHolder; public class ConversationItem extends AbstractFlexibleItem implements ISectionable, IFilterable { + private static final float STATUS_SIZE_IN_DP = 9f; private Conversation conversation; private UserEntity userEntity; @@ -198,23 +200,13 @@ public class ConversationItem extends AbstractFlexibleItem. --> - - - + + + + diff --git a/app/src/main/res/layout/current_account_item.xml b/app/src/main/res/layout/current_account_item.xml index 5e6ab4d57..680fb3a36 100644 --- a/app/src/main/res/layout/current_account_item.xml +++ b/app/src/main/res/layout/current_account_item.xml @@ -107,6 +107,7 @@ android:maxLines="1" android:textColor="?android:attr/textColorSecondary" android:visibility="gone" + tools:visibility="visible" tools:text="☁️ My custom status" /> - - + android:contentDescription="@string/nc_account_chooser_active_user" /> #222222 #818181 + + #353535 diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 6e29db17a..0289c8679 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -100,4 +100,8 @@ #eeeeee #EEEEEE + + #FFFFFF +