From 7a40841cbb869dd9c6e0110f701478eabb62ed25 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 16 Jun 2021 17:16:47 +0200 Subject: [PATCH] Fix color for phone calls --- .../vector/app/features/popup/IncomingCallAlert.kt | 8 ++++---- .../src/main/res/drawable/ic_call_answer_video.xml | 12 ++++++++++++ .../main/res/layout/alerter_incoming_call_layout.xml | 5 +++-- 3 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 vector/src/main/res/drawable/ic_call_answer_video.xml diff --git a/vector/src/main/java/im/vector/app/features/popup/IncomingCallAlert.kt b/vector/src/main/java/im/vector/app/features/popup/IncomingCallAlert.kt index fe9b0c86b9..33202403f9 100644 --- a/vector/src/main/java/im/vector/app/features/popup/IncomingCallAlert.kt +++ b/vector/src/main/java/im/vector/app/features/popup/IncomingCallAlert.kt @@ -43,10 +43,10 @@ class IncomingCallAlert(uid: String, private val onReject: () -> Unit) : VectorAlert.ViewBinder { override fun bind(view: View) { - val (callKindText, callKindIcon) = if (isVideoCall) { - Pair(R.string.action_video_call, R.drawable.ic_call_video_small) + val (callKindText, callKindIcon, callKindActionIcon) = if (isVideoCall) { + Triple(R.string.action_video_call, R.drawable.ic_call_video_small, R.drawable.ic_call_answer_video) } else { - Pair(R.string.action_voice_call, R.drawable.ic_call_audio_small) + Triple(R.string.action_voice_call, R.drawable.ic_call_audio_small, R.drawable.ic_call_answer) } view.findViewById(R.id.incomingCallKindView).apply { setText(callKindText) @@ -60,7 +60,7 @@ class IncomingCallAlert(uid: String, setOnClickListener { onAccept() } - setImageResource(callKindIcon) + setImageResource(callKindActionIcon) } view.findViewById(R.id.incomingCallRejectView).setOnClickListener { onReject() diff --git a/vector/src/main/res/drawable/ic_call_answer_video.xml b/vector/src/main/res/drawable/ic_call_answer_video.xml new file mode 100644 index 0000000000..d3af4f7b70 --- /dev/null +++ b/vector/src/main/res/drawable/ic_call_answer_video.xml @@ -0,0 +1,12 @@ + + + + diff --git a/vector/src/main/res/layout/alerter_incoming_call_layout.xml b/vector/src/main/res/layout/alerter_incoming_call_layout.xml index 82616e541b..8f737fb085 100644 --- a/vector/src/main/res/layout/alerter_incoming_call_layout.xml +++ b/vector/src/main/res/layout/alerter_incoming_call_layout.xml @@ -51,6 +51,7 @@ app:layout_constraintEnd_toStartOf="@+id/incomingCallRejectView" app:layout_constraintStart_toStartOf="@id/incomingCallNameView" app:layout_constraintTop_toBottomOf="@id/incomingCallNameView" + tools:drawableStart="@drawable/ic_call_audio_small" tools:text="@string/action_voice_call" /> + tools:ignore="MissingPrefix" + tools:src="@drawable/ic_call_answer" />