mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-25 22:29:45 +03:00
Icon Replacement (Suggestion) (#453)
This commit is contained in:
parent
093208921b
commit
171772a0a8
10 changed files with 31 additions and 29 deletions
|
@ -105,7 +105,7 @@ class AnimelibUpdateNotifier(private val context: Context) {
|
|||
context.notificationBuilder(Notifications.CHANNEL_LIBRARY_ERROR) {
|
||||
setContentTitle(context.resources.getQuantityString(R.plurals.notification_update_error, errors.size, errors.size))
|
||||
setContentText(context.getString(R.string.action_show_errors))
|
||||
setSmallIcon(R.drawable.ic_tachi)
|
||||
setSmallIcon(R.drawable.ic_ani)
|
||||
|
||||
setContentIntent(NotificationReceiver.openErrorLogPendingActivity(context, uri))
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ class AnimelibUpdateNotifier(private val context: Context) {
|
|||
}
|
||||
}
|
||||
|
||||
setSmallIcon(R.drawable.ic_tachi)
|
||||
setSmallIcon(R.drawable.ic_ani)
|
||||
setLargeIcon(notificationBitmap)
|
||||
|
||||
setGroup(Notifications.GROUP_NEW_CHAPTERS)
|
||||
|
@ -178,7 +178,7 @@ class AnimelibUpdateNotifier(private val context: Context) {
|
|||
setContentText(description)
|
||||
setStyle(NotificationCompat.BigTextStyle().bigText(description))
|
||||
|
||||
setSmallIcon(R.drawable.ic_tachi)
|
||||
setSmallIcon(R.drawable.ic_ani)
|
||||
|
||||
if (icon != null) {
|
||||
setLargeIcon(icon)
|
||||
|
|
|
@ -21,7 +21,7 @@ class BackupNotifier(private val context: Context) {
|
|||
|
||||
private val progressNotificationBuilder = context.notificationBuilder(Notifications.CHANNEL_BACKUP_RESTORE_PROGRESS) {
|
||||
setLargeIcon(BitmapFactory.decodeResource(context.resources, R.mipmap.ic_launcher))
|
||||
setSmallIcon(R.drawable.ic_tachi)
|
||||
setSmallIcon(R.drawable.ic_ani)
|
||||
setAutoCancel(false)
|
||||
setOngoing(true)
|
||||
setOnlyAlertOnce(true)
|
||||
|
@ -29,7 +29,7 @@ class BackupNotifier(private val context: Context) {
|
|||
|
||||
private val completeNotificationBuilder = context.notificationBuilder(Notifications.CHANNEL_BACKUP_RESTORE_COMPLETE) {
|
||||
setLargeIcon(BitmapFactory.decodeResource(context.resources, R.mipmap.ic_launcher))
|
||||
setSmallIcon(R.drawable.ic_tachi)
|
||||
setSmallIcon(R.drawable.ic_ani)
|
||||
setAutoCancel(false)
|
||||
}
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ class LibraryUpdateNotifier(private val context: Context) {
|
|||
context.notificationBuilder(Notifications.CHANNEL_LIBRARY_ERROR) {
|
||||
setContentTitle(context.resources.getQuantityString(R.plurals.notification_update_error, errors.size, errors.size))
|
||||
setContentText(context.getString(R.string.action_show_errors))
|
||||
setSmallIcon(R.drawable.ic_tachi)
|
||||
setSmallIcon(R.drawable.ic_ani)
|
||||
|
||||
setContentIntent(NotificationReceiver.openErrorLogPendingActivity(context, uri))
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ class LibraryUpdateNotifier(private val context: Context) {
|
|||
}
|
||||
}
|
||||
|
||||
setSmallIcon(R.drawable.ic_tachi)
|
||||
setSmallIcon(R.drawable.ic_ani)
|
||||
setLargeIcon(notificationBitmap)
|
||||
|
||||
setGroup(Notifications.GROUP_NEW_CHAPTERS)
|
||||
|
@ -178,7 +178,7 @@ class LibraryUpdateNotifier(private val context: Context) {
|
|||
setContentText(description)
|
||||
setStyle(NotificationCompat.BigTextStyle().bigText(description))
|
||||
|
||||
setSmallIcon(R.drawable.ic_tachi)
|
||||
setSmallIcon(R.drawable.ic_ani)
|
||||
|
||||
if (icon != null) {
|
||||
setLargeIcon(icon)
|
||||
|
|
|
@ -23,7 +23,7 @@ class AnimeExtensionInstallService : Service() {
|
|||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
val notification = notificationBuilder(Notifications.CHANNEL_EXTENSIONS_UPDATE) {
|
||||
setSmallIcon(R.drawable.ic_tachi)
|
||||
setSmallIcon(R.drawable.ic_ani)
|
||||
setAutoCancel(false)
|
||||
setOngoing(true)
|
||||
setShowWhen(false)
|
||||
|
|
|
@ -23,7 +23,7 @@ class ExtensionInstallService : Service() {
|
|||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
val notification = notificationBuilder(Notifications.CHANNEL_EXTENSIONS_UPDATE) {
|
||||
setSmallIcon(R.drawable.ic_tachi)
|
||||
setSmallIcon(R.drawable.ic_ani)
|
||||
setAutoCancel(false)
|
||||
setOngoing(true)
|
||||
setShowWhen(false)
|
||||
|
|
|
@ -18,7 +18,7 @@ import eu.kanade.tachiyomi.util.system.toast
|
|||
class CrashLogUtil(private val context: Context) {
|
||||
|
||||
private val notificationBuilder = context.notificationBuilder(Notifications.CHANNEL_CRASH_LOGS) {
|
||||
setSmallIcon(R.drawable.ic_tachi)
|
||||
setSmallIcon(R.drawable.ic_ani)
|
||||
}
|
||||
|
||||
fun dumpLogs() {
|
||||
|
|
14
app/src/main/res/drawable/ic_ani.xml
Normal file
14
app/src/main/res/drawable/ic_ani.xml
Normal file
|
@ -0,0 +1,14 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:viewportWidth="512"
|
||||
android:viewportHeight="512"
|
||||
android:width="256dp"
|
||||
android:height="256dp">
|
||||
<path
|
||||
android:pathData="M239.5 0L273.5 0L274.5 1L292.5 2L325.5 9L346.5 16Q401.6 37.4 439 76.5Q475.6 112.9 496 165.5L503 186.5L510 219.5L511 237.5L512 238.5L512 271.5L511 272.5L511 283.5L510 284.5L509 297.5L505 317.5L491 358.5Q466.8 411.8 425.5 448Q391.1 479.1 343.5 497L321.5 504L297.5 509L291.5 509L283.5 511L272.5 511L271.5 512L240.5 512L239.5 511L220.5 510L194.5 505L155.5 492Q100.1 467.4 63 424.5Q33.6 391.4 16 346.5L8 321.5L2 291.5L1 272.5L0 271.5L0 239.5L1 238.5L1 227.5L2 226.5L3 213.5L8 190.5Q14.7 165.7 25 144.5Q48.9 96.4 87.5 63Q116.9 36.9 155.5 20L198.5 6L227.5 1L238.5 1L239.5 0ZM253 64L252 65L237 65L236 66L218 68L182 79L149 97L130 112Q97 140 79 182L68 218L66 236L65 237L65 252L64 253Q67 260 65 272L66 273L68 293L78 327Q92 361 115 386Q142 415 181 432L215 443L232 445L233 446L240 446L241 447L255 447L256 448L257 447L271 447L272 446L293 444L327 434Q361 420 386 397Q415 370 432 332L443 298L445 281L446 280L446 272L447 271L447 258L448 257L447 255L447 237L445 230L444 218L435 188Q421 152 397 127Q370 96 330 79L314 73L295 68L283 67L276 65L258 65L253 64Z"
|
||||
android:fillColor="#FFFFFF"
|
||||
android:strokeWidth="1" />
|
||||
<path
|
||||
android:pathData="M206.5 159L213.5 160L222.5 165L342.5 240L350 246.5Q353 250.5 353 257.5Q351.5 266 345.5 270L217.5 350Q213.5 353 206.5 353Q198 351.5 194 345.5L191 337.5L191 174.5Q192.7 166.2 198.5 162L206.5 159Z"
|
||||
android:fillColor="#FFFFFF"
|
||||
android:strokeWidth="1" />
|
||||
</vector>
|
|
@ -1,12 +0,0 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="48dp"
|
||||
android:height="48dp"
|
||||
android:viewportWidth="256"
|
||||
android:viewportHeight="256">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M102.6,19.2c0.3,5.7 0.6,13.1 0.8,16.6l0.4,6.3 -42.7,-0.3c-23.4,-0.2 -43.4,-0.7 -44.3,-1.2 -1.7,-0.8 -1.8,0.6 -1.8,20.4v21.2l2.3,-0.6C23.9,79.7 50.6,79 126,79s102.1,0.7 108.8,2.6l2.2,0.6V61c0,-19.8 -0.1,-21.2 -1.7,-20.4 -1,0.5 -21,1 -44.4,1.2l-42.7,0.3 0.4,-6.3c0.2,-3.5 0.5,-10.9 0.8,-16.6l0.4,-10.2h-47.6l0.4,10.2zM58.8,93.2c-10.4,3.9 -18.8,7.7 -18.8,8.3 0,0.7 1.4,4.3 3.1,8.1 8,17.7 20.6,61.5 24.1,83.6 0.6,4.3 1.6,7.8 2.2,7.8 0.6,0 10.4,-3.2 21.9,-7.1 14.9,-5.2 20.7,-7.6 20.7,-8.7 0,-3.2 -17.8,-61 -26.2,-85C82,89.6 80.4,86 79.1,86.1c-0.9,0 -10,3.2 -20.3,7.1z" />
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M167.2,93.7c-3.3,21 -15.6,61.6 -28.8,95l-6.9,17.3H6v40h243v-40h-37.1c-29.3,0 -37,-0.3 -36.6,-1.3 0.3,-0.6 2.7,-5.9 5.3,-11.7 2.5,-5.8 7.5,-18.3 11,-27.9 6.7,-18.4 21.4,-64.3 21.4,-67 0,-1.3 -4.6,-2.8 -21.2,-6.9 -11.7,-2.9 -21.8,-5.2 -22.4,-5.2 -0.6,0 -1.6,3.5 -2.2,7.7z" />
|
||||
</vector>
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:width="72dp"
|
||||
android:height="72dp"
|
||||
android:drawable="@drawable/ic_tachi"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:drawable="@drawable/ic_ani"
|
||||
android:gravity="center" />
|
||||
</layer-list>
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
android:padding="32dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_gravity="center"
|
||||
app:srcCompat="@drawable/ic_tachi"
|
||||
app:srcCompat="@drawable/ic_ani"
|
||||
app:tint="?attr/colorOnSurface"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
|
|
Loading…
Reference in a new issue