1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-09-01 20:33:31 +02:00

The reminder notification now features a dedicated small icon (ic_notification_foreground) and uses the app's launcher icon (ic_launcher_foreground) as the large icon for improved visual clarity and consistency.

This commit is contained in:
oliexdev
2025-08-27 09:23:56 +02:00
parent 769a3db921
commit ac968424ae
2 changed files with 56 additions and 2 deletions

View File

@@ -24,6 +24,7 @@ import android.app.PendingIntent
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.graphics.BitmapFactory
import android.os.Build
import androidx.core.app.NotificationCompat
import androidx.core.app.NotificationManagerCompat
@@ -82,8 +83,8 @@ class ReminderWorker @AssistedInject constructor(
val pendingIntent = PendingIntent.getActivity(appContext, 0, intent, pendingFlags)
val notification = NotificationCompat.Builder(appContext, CHANNEL_ID)
.setSmallIcon(R.drawable.ic_launcher_beta_foreground)
.setContentTitle(appContext.getString(R.string.reminder_notification_title))
.setSmallIcon(R.drawable.ic_notification_foreground)
.setLargeIcon(BitmapFactory.decodeResource(appContext.resources, R.drawable.ic_launcher_foreground))
.setContentText(content)
.setStyle(NotificationCompat.BigTextStyle().bigText(content))
.setContentIntent(pendingIntent)

View File

@@ -0,0 +1,53 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="469.333"
android:viewportHeight="469.333">
<group
android:scaleX="0.8"
android:scaleY="0.8"
android:translateX="47"
android:translateY="47">
<path
android:fillColor="#FFFFFFFF"
android:fillType="evenOdd"
android:pathData="
M42.667969,0
C19.135992,0 0,19.135992 0,42.667969
V426.66797
c0,23.53098 19.135992,42.66601 42.667969,42.66601
H426.66797
c23.53098,0 42.66601,-19.13403 42.66601,-42.66601
V42.667969
C469.33298,19.135992 450.19895,0 426.66797,0
Z
M234.66797,64
c51.28095,0 99.4988,19.969271 135.75976,56.24023
c4.167,4.166 4.167,10.91504 0,15.08204
l-60.33203,60.33398
c-2.08399,2.083 -4.81397,3.125 -7.54297,3.125
c-2.72899,0 -5.45801,-1.042 -7.54101,-3.125
c-33.27097,-33.27097 -87.41849,-33.27097 -120.68945,0
c-4.166,4.167 -10.91504,4.167 -15.08204,0
L98.90625,135.32227
c-4.166996,-4.166 -4.166996,-10.91504 0,-15.08204
C135.16621,83.969271 183.38702,64 234.66797,64
Z
M302.177,173.406
c-19.563,-16.021 -43.542,-24.031 -67.51,-24.031
c-10.073,0 -20.078,1.741 -29.826,4.57
l-13.799,-30.362
c-2.417,-5.354 -8.729,-7.75 -14.125,-5.292
c-5.365,2.438 -7.729,8.76 -5.292,14.125
l13.361,29.395
c-6.214,3.271 -12.236,7.013 -17.829,11.595
L121.76,128.01
c31.198,-27.604 70.896,-42.677 112.906,-42.677
c42.01,0 81.708,15.073 112.906,42.677
Z" />
</group>
</vector>