mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
use bigger buttons at notifications accept/decline buttons
This commit is contained in:
@ -56,8 +56,8 @@ class CallNotificationManager(private val context: Context) {
|
|||||||
val declinePendingIntent =
|
val declinePendingIntent =
|
||||||
PendingIntent.getBroadcast(context, DECLINE_CALL_CODE, declineCallIntent, PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_MUTABLE)
|
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)
|
var callerName = if (callContact.name.isNotEmpty()) callContact.name else context.getString(R.string.unknown_caller)
|
||||||
if (callContact?.numberLabel?.isNotEmpty() == true) {
|
if (callContact.numberLabel.isNotEmpty()) {
|
||||||
callerName += " - ${callContact.numberLabel}"
|
callerName += " - ${callContact.numberLabel}"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ class CallNotificationManager(private val context: Context) {
|
|||||||
val builder = NotificationCompat.Builder(context, channelId)
|
val builder = NotificationCompat.Builder(context, channelId)
|
||||||
.setSmallIcon(R.drawable.ic_phone_vector)
|
.setSmallIcon(R.drawable.ic_phone_vector)
|
||||||
.setContentIntent(openAppPendingIntent)
|
.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)
|
.setCategory(Notification.CATEGORY_CALL)
|
||||||
.setCustomContentView(collapsedView)
|
.setCustomContentView(collapsedView)
|
||||||
.setOngoing(true)
|
.setOngoing(true)
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
android:layout_height="@dimen/call_notification_button_size"
|
android:layout_height="@dimen/call_notification_button_size"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@drawable/ripple_background"
|
android:background="@drawable/ripple_background"
|
||||||
|
android:padding="@dimen/small_margin"
|
||||||
android:src="@drawable/ic_phone_down_red_vector" />
|
android:src="@drawable/ic_phone_down_red_vector" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@ -52,6 +53,7 @@
|
|||||||
android:layout_height="@dimen/call_notification_button_size"
|
android:layout_height="@dimen/call_notification_button_size"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@drawable/ripple_background"
|
android:background="@drawable/ripple_background"
|
||||||
|
android:padding="@dimen/small_margin"
|
||||||
android:src="@drawable/ic_phone_green_vector" />
|
android:src="@drawable/ic_phone_green_vector" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<dimen name="dialpad_button_size_small">50dp</dimen>
|
<dimen name="dialpad_button_size_small">50dp</dimen>
|
||||||
<dimen name="incoming_call_arrow_size">50dp</dimen>
|
<dimen name="incoming_call_arrow_size">50dp</dimen>
|
||||||
<dimen name="incoming_call_button_size">72dp</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="incoming_call_avatar_size">120dp</dimen>
|
||||||
|
|
||||||
<dimen name="dialpad_text_size">30sp</dimen>
|
<dimen name="dialpad_text_size">30sp</dimen>
|
||||||
|
Reference in New Issue
Block a user