Use white icons to avoid issues with notification icon colorization

This commit is contained in:
xynngh 2020-05-06 21:58:04 +04:00
parent bde29bb891
commit 0fa0e13da2
9 changed files with 38 additions and 38 deletions

View File

@ -43,24 +43,24 @@ class IconAndColor {
static IconAndColor forNumberRating(NumberRating rating) {
switch (rating) {
case NEUTRAL:
return of(R.drawable.ic_thumbs_up_down_black_24dp, R.color.rateNeutral);
return of(R.drawable.ic_thumbs_up_down_24dp, R.color.rateNeutral);
case POSITIVE:
return of(R.drawable.ic_thumb_up_black_24dp, R.color.ratePositive);
return of(R.drawable.ic_thumb_up_24dp, R.color.ratePositive);
case NEGATIVE:
return of(R.drawable.ic_thumb_down_black_24dp, R.color.rateNegative);
return of(R.drawable.ic_thumb_down_24dp, R.color.rateNegative);
}
return new IconAndColor(R.drawable.ic_thumbs_up_down_black_24dp, R.color.notFound, true);
return new IconAndColor(R.drawable.ic_thumbs_up_down_24dp, R.color.notFound, true);
}
static IconAndColor forNumberRating(NumberInfo.Rating rating) {
switch (rating) {
case NEUTRAL:
return of(R.drawable.ic_thumbs_up_down_black_24dp, R.color.rateNeutral);
return of(R.drawable.ic_thumbs_up_down_24dp, R.color.rateNeutral);
case POSITIVE:
return of(R.drawable.ic_thumb_up_black_24dp, R.color.ratePositive);
return of(R.drawable.ic_thumb_up_24dp, R.color.ratePositive);
case NEGATIVE:
return of(R.drawable.ic_thumb_down_black_24dp, R.color.rateNegative);
return of(R.drawable.ic_thumb_down_24dp, R.color.rateNegative);
}
return new IconAndColor(R.drawable.ic_thumbs_up_down_black_24dp, R.color.notFound, true);
return new IconAndColor(R.drawable.ic_thumbs_up_down_24dp, R.color.notFound, true);
}
}

View File

@ -77,7 +77,7 @@ public class NotificationHelper {
context, 0, intent, 0);
return new NotificationCompat.Builder(context, CHANNEL_ID_TASKS)
.setSmallIcon(R.drawable.ic_file_download_black_24dp)
.setSmallIcon(R.drawable.ic_file_download_24dp)
.setContentIntent(contentIntent)
.setContentTitle(title).build();
}
@ -92,28 +92,28 @@ public class NotificationHelper {
case POSITIVE:
channelId = numberInfo.known ? CHANNEL_ID_POSITIVE_KNOWN : CHANNEL_ID_POSITIVE;
title = context.getString(R.string.notification_incoming_call_positive);
icon = R.drawable.ic_thumb_up_black_24dp;
icon = R.drawable.ic_thumb_up_24dp;
color = 0xff00ff00;
break;
case NEUTRAL:
channelId = CHANNEL_ID_NEUTRAL;
title = context.getString(R.string.notification_incoming_call_neutral);
icon = R.drawable.ic_thumbs_up_down_black_24dp;
icon = R.drawable.ic_thumbs_up_down_24dp;
color = 0xffffff60;
break;
case NEGATIVE:
channelId = CHANNEL_ID_NEGATIVE;
title = context.getString(R.string.notification_incoming_call_negative);
icon = R.drawable.ic_thumb_down_black_24dp;
icon = R.drawable.ic_thumb_down_24dp;
color = 0xffff0000;
break;
default:
channelId = CHANNEL_ID_UNKNOWN;
title = context.getString(R.string.notification_incoming_call_unknown);
icon = R.drawable.ic_thumbs_up_down_black_24dp;
icon = R.drawable.ic_thumbs_up_down_24dp;
color = 0xffffff60;
break;
}
@ -147,7 +147,7 @@ public class NotificationHelper {
String text = getDescription(context, numberInfo);
return new NotificationCompat.Builder(context, CHANNEL_ID_BLOCKED_INFO)
.setSmallIcon(R.drawable.ic_thumb_down_black_24dp)
.setSmallIcon(R.drawable.ic_thumb_down_24dp)
.setColor(0xffffff60)
.setContentTitle(title)
.setContentText(text)

View File

@ -4,6 +4,6 @@
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:fillColor="#FFFFFFFF"
android:pathData="M19,9h-4V3H9v6H5l7,7 7,-7zM5,18v2h14v-2H5z" />
</vector>

View File

@ -1,9 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M15,3L6,3c-0.83,0 -1.54,0.5 -1.84,1.22l-3.02,7.05c-0.09,0.23 -0.14,0.47 -0.14,0.73v1.91l0.01,0.01L1,14c0,1.1 0.9,2 2,2h6.31l-0.95,4.57 -0.03,0.32c0,0.41 0.17,0.79 0.44,1.06L9.83,23l6.59,-6.59c0.36,-0.36 0.58,-0.86 0.58,-1.41L17,5c0,-1.1 -0.9,-2 -2,-2zM19,3v12h4L23,3h-4z"/>
android:fillColor="#FFFFFFFF"
android:pathData="M15,3L6,3c-0.83,0 -1.54,0.5 -1.84,1.22l-3.02,7.05c-0.09,0.23 -0.14,0.47 -0.14,0.73v1.91l0.01,0.01L1,14c0,1.1 0.9,2 2,2h6.31l-0.95,4.57 -0.03,0.32c0,0.41 0.17,0.79 0.44,1.06L9.83,23l6.59,-6.59c0.36,-0.36 0.58,-0.86 0.58,-1.41L17,5c0,-1.1 -0.9,-2 -2,-2zM19,3v12h4L23,3h-4z" />
</vector>

View File

@ -1,9 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M1,21h4L5,9L1,9v12zM23,10c0,-1.1 -0.9,-2 -2,-2h-6.31l0.95,-4.57 0.03,-0.32c0,-0.41 -0.17,-0.79 -0.44,-1.06L14.17,1 7.59,7.59C7.22,7.95 7,8.45 7,9v10c0,1.1 0.9,2 2,2h9c0.83,0 1.54,-0.5 1.84,-1.22l3.02,-7.05c0.09,-0.23 0.14,-0.47 0.14,-0.73v-1.91l-0.01,-0.01L23,10z"/>
android:fillColor="#FFFFFFFF"
android:pathData="M1,21h4L5,9L1,9v12zM23,10c0,-1.1 -0.9,-2 -2,-2h-6.31l0.95,-4.57 0.03,-0.32c0,-0.41 -0.17,-0.79 -0.44,-1.06L14.17,1 7.59,7.59C7.22,7.95 7,8.45 7,9v10c0,1.1 0.9,2 2,2h9c0.83,0 1.54,-0.5 1.84,-1.22l3.02,-7.05c0.09,-0.23 0.14,-0.47 0.14,-0.73v-1.91l-0.01,-0.01L23,10z" />
</vector>

View File

@ -1,9 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M12,6c0,-0.55 -0.45,-1 -1,-1L5.82,5l0.66,-3.18 0.02,-0.23c0,-0.31 -0.13,-0.59 -0.33,-0.8L5.38,0 0.44,4.94C0.17,5.21 0,5.59 0,6v6.5c0,0.83 0.67,1.5 1.5,1.5h6.75c0.62,0 1.15,-0.38 1.38,-0.91l2.26,-5.29c0.07,-0.17 0.11,-0.36 0.11,-0.55L12,6zM22.5,10h-6.75c-0.62,0 -1.15,0.38 -1.38,0.91l-2.26,5.29c-0.07,0.17 -0.11,0.36 -0.11,0.55L12,18c0,0.55 0.45,1 1,1h5.18l-0.66,3.18 -0.02,0.24c0,0.31 0.13,0.59 0.33,0.8l0.79,0.78 4.94,-4.94c0.27,-0.27 0.44,-0.65 0.44,-1.06v-6.5c0,-0.83 -0.67,-1.5 -1.5,-1.5z"/>
android:fillColor="#FFFFFFFF"
android:pathData="M12,6c0,-0.55 -0.45,-1 -1,-1L5.82,5l0.66,-3.18 0.02,-0.23c0,-0.31 -0.13,-0.59 -0.33,-0.8L5.38,0 0.44,4.94C0.17,5.21 0,5.59 0,6v6.5c0,0.83 0.67,1.5 1.5,1.5h6.75c0.62,0 1.15,-0.38 1.38,-0.91l2.26,-5.29c0.07,-0.17 0.11,-0.36 0.11,-0.55L12,6zM22.5,10h-6.75c-0.62,0 -1.15,0.38 -1.38,0.91l-2.26,5.29c-0.07,0.17 -0.11,0.36 -0.11,0.55L12,18c0,0.55 0.45,1 1,1h5.18l-0.66,3.18 -0.02,0.24c0,0.31 0.13,0.59 0.33,0.8l0.79,0.78 4.94,-4.94c0.27,-0.27 0.44,-0.65 0.44,-1.06v-6.5c0,-0.83 -0.67,-1.5 -1.5,-1.5z" />
</vector>

View File

@ -36,7 +36,7 @@
android:layout_marginTop="8dp"
android:layout_marginRight="1dp"
android:layout_marginBottom="8dp"
android:src="@drawable/ic_thumb_down_black_24dp" />
android:src="@drawable/ic_thumb_down_24dp" />
<Space
android:layout_width="0dp"

View File

@ -13,7 +13,7 @@
android:layout_marginRight="16dp"
android:layout_marginBottom="10dp"
android:tint="@color/rateNeutral"
android:src="@drawable/ic_thumbs_up_down_black_24dp"/>
android:src="@drawable/ic_thumbs_up_down_24dp"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"

View File

@ -20,7 +20,7 @@
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_thumb_down_black_24dp"
android:src="@drawable/ic_thumb_down_24dp"
android:tint="@color/rateNegative" />
<TextView
@ -43,7 +43,7 @@
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/ic_thumbs_up_down_black_24dp"
android:src="@drawable/ic_thumbs_up_down_24dp"
android:tint="@color/rateNeutral" />
<TextView
@ -66,7 +66,7 @@
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/ic_thumb_up_black_24dp"
android:src="@drawable/ic_thumb_up_24dp"
android:tint="@color/ratePositive" />
<TextView