use drawable inset to make the icon smaller

This commit is contained in:
Mysochenko Yuriy
2022-05-13 15:32:40 +03:00
parent 7dd209d5c4
commit fc97cc2f57
4 changed files with 9 additions and 7 deletions

View File

@ -312,7 +312,7 @@ class CallActivity : SimpleActivity() {
private fun toggleHold() { private fun toggleHold() {
val isOnHold = CallManager.toggleHold() val isOnHold = CallManager.toggleHold()
val drawable = if (isOnHold) R.drawable.ic_phone_vector else R.drawable.ic_call_hold val drawable = if (isOnHold) R.drawable.ic_phone_vector else R.drawable.ic_pause_inset
call_toggle_hold.setImageDrawable(getDrawable(drawable)) call_toggle_hold.setImageDrawable(getDrawable(drawable))
call_toggle_hold.contentDescription = getString(if (isOnHold) R.string.resume_call else R.string.hold_call) call_toggle_hold.contentDescription = getString(if (isOnHold) R.string.resume_call else R.string.hold_call)
hold_status_label.beVisibleIf(isOnHold) hold_status_label.beVisibleIf(isOnHold)

View File

@ -1,5 +0,0 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M6,19h4L10,5L6,5v14zM14,5v14h4L18,5h-4z"/>
</vector>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_pause_vector"
android:insetLeft="4dp"
android:insetTop="4dp"
android:insetRight="4dp"
android:insetBottom="4dp" />

View File

@ -158,7 +158,7 @@
android:layout_marginTop="@dimen/bigger_margin" android:layout_marginTop="@dimen/bigger_margin"
android:background="?attr/selectableItemBackgroundBorderless" android:background="?attr/selectableItemBackgroundBorderless"
android:padding="@dimen/medium_margin" android:padding="@dimen/medium_margin"
android:src="@drawable/ic_call_hold" android:src="@drawable/ic_pause_inset"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"