【推送】锁屏界面中推送信息显示不全
This commit is contained in:
parent
aed14e7277
commit
57ef04f86e
|
|
@ -334,8 +334,8 @@ object NotificationTriggerController {
|
||||||
|
|
||||||
private fun resident(model: GeneralNotificationData) =
|
private fun resident(model: GeneralNotificationData) =
|
||||||
NotificationCompat.Builder(context!!, CHANNEL_ID_RESIDENT)
|
NotificationCompat.Builder(context!!, CHANNEL_ID_RESIDENT)
|
||||||
.setColor(ContextCompat.getColor(context!!, R.color.noti_color))
|
//.setColor(ContextCompat.getColor(context!!, R.color.noti_color))
|
||||||
.setSmallIcon(R.drawable.ic_noti_icon)
|
.setSmallIcon(R.mipmap.logo)
|
||||||
.setContentTitle(model.contentTitle)
|
.setContentTitle(model.contentTitle)
|
||||||
.setContentText(model.contentContent)
|
.setContentText(model.contentContent)
|
||||||
.setPriority(NotificationCompat.PRIORITY_MAX)
|
.setPriority(NotificationCompat.PRIORITY_MAX)
|
||||||
|
|
@ -365,7 +365,7 @@ object NotificationTriggerController {
|
||||||
val builder = NotificationCompat.Builder(context!!, channelId)
|
val builder = NotificationCompat.Builder(context!!, channelId)
|
||||||
.setPriority(NotificationCompat.PRIORITY_MAX)
|
.setPriority(NotificationCompat.PRIORITY_MAX)
|
||||||
.setColor(ContextCompat.getColor(context!!, R.color.noti_color))
|
.setColor(ContextCompat.getColor(context!!, R.color.noti_color))
|
||||||
.setSmallIcon(R.drawable.ic_noti_icon).setAutoCancel(true)
|
.setSmallIcon(R.mipmap.logo).setAutoCancel(true)
|
||||||
.setGroup("push_" + System.currentTimeMillis()).setContentText(model.contentTitle)
|
.setGroup("push_" + System.currentTimeMillis()).setContentText(model.contentTitle)
|
||||||
.setContentIntent(model.contentIntent).setDeleteIntent(deletePendingIntent) // 设置删除监听
|
.setContentIntent(model.contentIntent).setDeleteIntent(deletePendingIntent) // 设置删除监听
|
||||||
.setCustomContentView(model.contentView).setCustomBigContentView(model.bigContentView)
|
.setCustomContentView(model.contentView).setCustomBigContentView(model.bigContentView)
|
||||||
|
|
@ -402,7 +402,7 @@ object NotificationTriggerController {
|
||||||
val builder = NotificationCompat.Builder(context!!, channelId)
|
val builder = NotificationCompat.Builder(context!!, channelId)
|
||||||
.setPriority(NotificationCompat.PRIORITY_MAX)
|
.setPriority(NotificationCompat.PRIORITY_MAX)
|
||||||
.setColor(ContextCompat.getColor(context!!, R.color.noti_color))
|
.setColor(ContextCompat.getColor(context!!, R.color.noti_color))
|
||||||
.setSmallIcon(R.drawable.ic_noti_icon).setAutoCancel(true)
|
.setSmallIcon(R.mipmap.logo).setAutoCancel(true)
|
||||||
.setGroup("push_" + System.currentTimeMillis()).setContentText(model.contentTitle)
|
.setGroup("push_" + System.currentTimeMillis()).setContentText(model.contentTitle)
|
||||||
.setContentIntent(model.contentIntent).setDeleteIntent(deletePendingIntent) // 设置删除监听
|
.setContentIntent(model.contentIntent).setDeleteIntent(deletePendingIntent) // 设置删除监听
|
||||||
.setCustomContentView(model.contentView).setCustomBigContentView(model.bigContentView)
|
.setCustomContentView(model.contentView).setCustomBigContentView(model.bigContentView)
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
|
|
@ -2,11 +2,11 @@
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="45dp"
|
||||||
android:background="@drawable/noti_bg_r16_white"
|
android:background="@drawable/noti_bg_r16_white"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:padding="5dp"
|
android:padding="0dp"
|
||||||
tools:ignore="ResourceName">
|
tools:ignore="ResourceName">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,11 @@
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="65dp"
|
android:layout_height="48dp"
|
||||||
android:background="@drawable/noti_bg_r16_white"
|
android:background="@drawable/noti_bg_r16_white"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:padding="5dp"
|
android:padding="0dp"
|
||||||
tools:ignore="ResourceName">
|
tools:ignore="ResourceName">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
|
|
@ -15,8 +15,8 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1">
|
android:layout_weight="1">
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="60dp"
|
android:layout_width="55dp"
|
||||||
android:layout_height="60dp"
|
android:layout_height="55dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
|
|
@ -58,8 +58,8 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1">
|
android:layout_weight="1">
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="60dp"
|
android:layout_width="55dp"
|
||||||
android:layout_height="60dp"
|
android:layout_height="55dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
|
|
@ -100,8 +100,8 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1">
|
android:layout_weight="1">
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="60dp"
|
android:layout_width="55dp"
|
||||||
android:layout_height="60dp"
|
android:layout_height="55dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
|
|
@ -127,8 +127,8 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1">
|
android:layout_weight="1">
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="60dp"
|
android:layout_width="55dp"
|
||||||
android:layout_height="60dp"
|
android:layout_height="55dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
Loading…
Reference in New Issue