mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-23 18:05:59 +03:00
Fix color for phone calls
This commit is contained in:
parent
9b215d2df6
commit
7a40841cbb
3 changed files with 19 additions and 6 deletions
|
@ -43,10 +43,10 @@ class IncomingCallAlert(uid: String,
|
||||||
private val onReject: () -> Unit) : VectorAlert.ViewBinder {
|
private val onReject: () -> Unit) : VectorAlert.ViewBinder {
|
||||||
|
|
||||||
override fun bind(view: View) {
|
override fun bind(view: View) {
|
||||||
val (callKindText, callKindIcon) = if (isVideoCall) {
|
val (callKindText, callKindIcon, callKindActionIcon) = if (isVideoCall) {
|
||||||
Pair(R.string.action_video_call, R.drawable.ic_call_video_small)
|
Triple(R.string.action_video_call, R.drawable.ic_call_video_small, R.drawable.ic_call_answer_video)
|
||||||
} else {
|
} 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<TextView>(R.id.incomingCallKindView).apply {
|
view.findViewById<TextView>(R.id.incomingCallKindView).apply {
|
||||||
setText(callKindText)
|
setText(callKindText)
|
||||||
|
@ -60,7 +60,7 @@ class IncomingCallAlert(uid: String,
|
||||||
setOnClickListener {
|
setOnClickListener {
|
||||||
onAccept()
|
onAccept()
|
||||||
}
|
}
|
||||||
setImageResource(callKindIcon)
|
setImageResource(callKindActionIcon)
|
||||||
}
|
}
|
||||||
view.findViewById<ImageView>(R.id.incomingCallRejectView).setOnClickListener {
|
view.findViewById<ImageView>(R.id.incomingCallRejectView).setOnClickListener {
|
||||||
onReject()
|
onReject()
|
||||||
|
|
12
vector/src/main/res/drawable/ic_call_answer_video.xml
Normal file
12
vector/src/main/res/drawable/ic_call_answer_video.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="25dp"
|
||||||
|
android:height="25dp"
|
||||||
|
android:viewportWidth="25"
|
||||||
|
android:viewportHeight="25">
|
||||||
|
<path
|
||||||
|
android:pathData="M0.5,7.5C0.5,5.8432 1.8432,4.5 3.5,4.5H14.5C16.1569,4.5 17.5,5.8432 17.5,7.5V17.5C17.5,19.1569 16.1569,20.5 14.5,20.5H3.5C1.8432,20.5 0.5,19.1569 0.5,17.5V7.5Z"
|
||||||
|
android:fillColor="#FFFFFF"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M19.5,9.5L22.8753,6.7998C23.5301,6.2759 24.5,6.7421 24.5,7.5806V17.4194C24.5,18.2579 23.5301,18.7241 22.8753,18.2002L19.5,15.5V9.5Z"
|
||||||
|
android:fillColor="#FFFFFF"/>
|
||||||
|
</vector>
|
|
@ -51,6 +51,7 @@
|
||||||
app:layout_constraintEnd_toStartOf="@+id/incomingCallRejectView"
|
app:layout_constraintEnd_toStartOf="@+id/incomingCallRejectView"
|
||||||
app:layout_constraintStart_toStartOf="@id/incomingCallNameView"
|
app:layout_constraintStart_toStartOf="@id/incomingCallNameView"
|
||||||
app:layout_constraintTop_toBottomOf="@id/incomingCallNameView"
|
app:layout_constraintTop_toBottomOf="@id/incomingCallNameView"
|
||||||
|
tools:drawableStart="@drawable/ic_call_audio_small"
|
||||||
tools:text="@string/action_voice_call" />
|
tools:text="@string/action_voice_call" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
@ -64,12 +65,12 @@
|
||||||
android:contentDescription="@string/call_notification_answer"
|
android:contentDescription="@string/call_notification_answer"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:padding="8dp"
|
android:padding="8dp"
|
||||||
android:src="@drawable/ic_call_answer"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:tint="?colorOnPrimary"
|
app:tint="?colorOnPrimary"
|
||||||
tools:ignore="MissingPrefix" />
|
tools:ignore="MissingPrefix"
|
||||||
|
tools:src="@drawable/ic_call_answer" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/incomingCallRejectView"
|
android:id="@+id/incomingCallRejectView"
|
||||||
|
|
Loading…
Reference in a new issue