use bigger buttons at notifications accept/decline buttons

This commit is contained in:
tibbi 2022-05-27 19:02:17 +02:00
parent ebf827399a
commit 35da1c86a8
3 changed files with 6 additions and 4 deletions

View File

@ -56,8 +56,8 @@ class CallNotificationManager(private val context: Context) {
val declinePendingIntent =
PendingIntent.getBroadcast(context, DECLINE_CALL_CODE, declineCallIntent, PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_MUTABLE)
var callerName = if (callContact != null && callContact.name.isNotEmpty()) callContact.name else context.getString(R.string.unknown_caller)
if (callContact?.numberLabel?.isNotEmpty() == true) {
var callerName = if (callContact.name.isNotEmpty()) callContact.name else context.getString(R.string.unknown_caller)
if (callContact.numberLabel.isNotEmpty()) {
callerName += " - ${callContact.numberLabel}"
}
@ -85,7 +85,7 @@ class CallNotificationManager(private val context: Context) {
val builder = NotificationCompat.Builder(context, channelId)
.setSmallIcon(R.drawable.ic_phone_vector)
.setContentIntent(openAppPendingIntent)
.setPriority(if(isHighPriority) NotificationCompat.PRIORITY_MAX else NotificationCompat.PRIORITY_DEFAULT)
.setPriority(if (isHighPriority) NotificationCompat.PRIORITY_MAX else NotificationCompat.PRIORITY_DEFAULT)
.setCategory(Notification.CATEGORY_CALL)
.setCustomContentView(collapsedView)
.setOngoing(true)

View File

@ -44,6 +44,7 @@
android:layout_height="@dimen/call_notification_button_size"
android:layout_weight="1"
android:background="@drawable/ripple_background"
android:padding="@dimen/small_margin"
android:src="@drawable/ic_phone_down_red_vector" />
<ImageView
@ -52,6 +53,7 @@
android:layout_height="@dimen/call_notification_button_size"
android:layout_weight="1"
android:background="@drawable/ripple_background"
android:padding="@dimen/small_margin"
android:src="@drawable/ic_phone_green_vector" />
</LinearLayout>

View File

@ -4,7 +4,7 @@
<dimen name="dialpad_button_size_small">50dp</dimen>
<dimen name="incoming_call_arrow_size">50dp</dimen>
<dimen name="incoming_call_button_size">72dp</dimen>
<dimen name="call_notification_button_size">30dp</dimen>
<dimen name="call_notification_button_size">40dp</dimen>
<dimen name="incoming_call_avatar_size">120dp</dimen>
<dimen name="dialpad_text_size">30sp</dimen>