Add specific icon for notifications
This commit is contained in:
parent
88ffd9eb4b
commit
3b781df5d8
@ -4,7 +4,6 @@ import android.app.IntentService
|
||||
import android.content.Intent
|
||||
import androidx.core.app.NotificationCompat
|
||||
import androidx.core.app.NotificationManagerCompat
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.readrops.app.R
|
||||
import com.readrops.app.ReadropsApp
|
||||
import com.readrops.app.database.Database
|
||||
@ -20,8 +19,7 @@ class FeedsColorsIntentService : IntentService("FeedsColorsIntentService") {
|
||||
val notificationBuilder = NotificationCompat.Builder(this, ReadropsApp.FEEDS_COLORS_CHANNEL_ID)
|
||||
.setContentTitle(getString(R.string.get_feeds_colors))
|
||||
.setProgress(feeds.size, 0, false)
|
||||
.setSmallIcon(R.drawable.ic_readrops)
|
||||
.setColor(ContextCompat.getColor(this, R.color.colorPrimary))
|
||||
.setSmallIcon(R.drawable.ic_notif)
|
||||
.setOnlyAlertOnce(true)
|
||||
|
||||
startForeground(NOTIFICATION_ID, notificationBuilder.build())
|
||||
|
20
app/src/main/res/drawable/ic_notif.xml
Normal file
20
app/src/main/res/drawable/ic_notif.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="256dp"
|
||||
android:height="256dp"
|
||||
android:viewportWidth="256"
|
||||
android:viewportHeight="256">
|
||||
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M119.105,183.425C107.127,195.403 86.992,194.681 74.134,181.823C61.275,168.964 60.557,148.832 72.535,136.854C84.513,124.877 104.645,125.595 117.5,138.451C130.364,151.315 131.083,171.447 119.105,183.425" />
|
||||
<path
|
||||
android:fillColor="#727272"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M113.728,159.622C110.739,162.611 104.392,161.119 99.558,156.29C94.718,151.454 93.23,145.105 96.223,142.113C99.215,139.121 105.559,140.61 110.396,145.448C115.227,150.281 116.718,156.628 113.728,159.622" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M16.301,127.979a111.96,111.829 89.999,1 0,223.658 0a111.96,111.829 89.999,1 0,-223.658 0z"
|
||||
android:strokeWidth="29.11"
|
||||
android:strokeColor="#000000" />
|
||||
</vector>
|
Loading…
x
Reference in New Issue
Block a user