From 9c9d2f8a8fa5b7ad4573b13b145da15d15ecdcf5 Mon Sep 17 00:00:00 2001 From: Andy Scherzinger Date: Tue, 29 Jun 2021 09:24:59 +0200 Subject: [PATCH 1/3] a11y - raise contrast text/bubble in dark mode Signed-off-by: Andy Scherzinger --- app/src/main/res/values-night/colors.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index f70a55e11..501f515c6 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -56,8 +56,8 @@ #121212 - #484848 - #66484848 + #1CFFFFFF + #14FFFFFF #8c8c8c From 9a4d7b78a2a8cc6ae414965b405c11c58c052adf Mon Sep 17 00:00:00 2001 From: Andy Scherzinger Date: Tue, 29 Jun 2021 10:11:12 +0200 Subject: [PATCH 2/3] a11y - raise hitbox of icons to 48dp Signed-off-by: Andy Scherzinger --- app/src/main/res/layout/controller_chat.xml | 10 ++-- .../main/res/layout/view_message_input.xml | 46 +++++++++++-------- 2 files changed, 32 insertions(+), 24 deletions(-) diff --git a/app/src/main/res/layout/controller_chat.xml b/app/src/main/res/layout/controller_chat.xml index cf8172725..d0d9650df 100644 --- a/app/src/main/res/layout/controller_chat.xml +++ b/app/src/main/res/layout/controller_chat.xml @@ -2,6 +2,8 @@ ~ Nextcloud Talk application ~ ~ @author Mario Danic + ~ @author Andy Scherzinger + ~ Copyright (C) 2021 Andy Scherzinger ~ Copyright (C) 2017-2018 Mario Danic ~ ~ This program is free software: you can redistribute it and/or modify @@ -78,14 +80,14 @@ android:inputType="textLongMessage|textAutoComplete" android:maxLength="1000" app:showAttachmentButton="true" - app:attachmentButtonHeight="28dp" - app:attachmentButtonWidth="28dp" + app:attachmentButtonHeight="48dp" + app:attachmentButtonWidth="48dp" app:attachmentButtonIcon="@drawable/ic_baseline_attach_file_24" app:attachmentButtonBackground="@color/transparent" app:inputButtonDefaultBgColor="@color/colorPrimary" - app:inputButtonHeight="35dp" + app:inputButtonHeight="48dp" app:inputButtonMargin="8dp" - app:inputButtonWidth="36dp" + app:inputButtonWidth="48dp" app:inputHint="@string/nc_hint_enter_a_message" app:inputTextColor="@color/nc_incoming_text_default" app:inputTextSize="16sp" diff --git a/app/src/main/res/layout/view_message_input.xml b/app/src/main/res/layout/view_message_input.xml index 3019b054a..f3851985d 100644 --- a/app/src/main/res/layout/view_message_input.xml +++ b/app/src/main/res/layout/view_message_input.xml @@ -2,6 +2,10 @@ ~ Nextcloud Talk application ~ ~ @author Mario Danic + ~ @author Marcel Hibbe + ~ @author Andy Scherzinger + ~ Copyright (C) 2021 Andy Scherzinger + ~ Copyright (C) 2021 Marcel Hibbe ~ Copyright (C) 2017-2018 Mario Danic ~ ~ This program is free software: you can redistribute it and/or modify @@ -36,24 +40,25 @@ @@ -63,11 +68,12 @@ android:layout_height="wrap_content" android:layout_below="@+id/quotedChatMessageView" android:layout_centerHorizontal="true" - android:layout_toEndOf="@id/smileyButton" android:layout_toStartOf="@id/messageSendButton" + android:layout_toEndOf="@id/smileyButton" android:imeOptions="actionDone" android:inputType="textAutoCorrect|textMultiLine|textCapSentences" - android:lineSpacingMultiplier="1.2" /> + android:lineSpacingMultiplier="1.2" + android:minHeight="48dp" /> + tools:visibility="gone"/> + tools:visibility="gone" /> Date: Tue, 29 Jun 2021 23:55:40 +0200 Subject: [PATCH 3/3] optimize message input for size+a11y Signed-off-by: Andy Scherzinger --- .../talk/controllers/ChatController.kt | 2 + app/src/main/res/layout/controller_chat.xml | 227 +++++++++--------- .../main/res/layout/view_message_input.xml | 9 +- 3 files changed, 127 insertions(+), 111 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt index e12c711e9..fa734e885 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt +++ b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt @@ -563,6 +563,8 @@ class ChatController(args: Bundle) : } } + binding.messageInputView.setPadding(0, 0, 0, 0) + if (args.containsKey("showToggleChat") && args.getBoolean("showToggleChat")) { binding.callControlToggleChat.visibility = View.VISIBLE wasDetached = true diff --git a/app/src/main/res/layout/controller_chat.xml b/app/src/main/res/layout/controller_chat.xml index d0d9650df..d7980e703 100644 --- a/app/src/main/res/layout/controller_chat.xml +++ b/app/src/main/res/layout/controller_chat.xml @@ -20,125 +20,136 @@ ~ along with this program. If not, see . --> - + android:background="@color/bg_default" + android:orientation="vertical"> - + - + + + + + + + + + + + + + + + + + + + android:orientation="vertical"> - + - - - + - - - - - - - - - - + \ No newline at end of file diff --git a/app/src/main/res/layout/view_message_input.xml b/app/src/main/res/layout/view_message_input.xml index f3851985d..452449428 100644 --- a/app/src/main/res/layout/view_message_input.xml +++ b/app/src/main/res/layout/view_message_input.xml @@ -30,7 +30,8 @@ + android:layout_height="wrap_content" + android:layout_marginEnd="4dp"> @@ -53,7 +55,7 @@ android:id="@+id/smileyButton" android:layout_width="48dp" android:layout_height="48dp" - android:padding="10dp" + android:padding="12dp" android:layout_below="@id/quotedChatMessageView" android:layout_toEndOf="@id/attachmentButton" android:background="@color/transparent" @@ -140,6 +142,7 @@ android:id="@id/messageSendButton" android:layout_width="48dp" android:layout_height="48dp" + android:padding="12dp" android:layout_below="@id/quotedChatMessageView" android:layout_alignParentEnd="true" android:adjustViewBounds="true"