use vector drawable for notification icon

This commit is contained in:
Daniel Gultsch 2024-04-05 13:04:27 +02:00
parent 77a40679ab
commit a2c44aac8a
No known key found for this signature in database
GPG key ID: F43D18AD2A0982C2
21 changed files with 39 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 798 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="512"
android:viewportHeight="512">
<group android:translateX="5.31">
<path
android:fillColor="@android:color/white"
android:pathData="M253.219,17.719C126.144,17.719 22.469,118.884 22.469,243.75C22.469,368.616 126.138,469.844 253.219,469.844C292.739,469.844 323.216,461.736 358,449.094L468.469,493.625A14.556,14.562 0,0 0,488.063 476.625L458.125,355.656C477.356,321.886 483.938,283.416 483.938,243.75C483.938,118.887 380.293,17.719 253.219,17.719zM143.844,222C157.651,222 168.844,233.193 168.844,247C168.844,260.807 157.651,272 143.844,272C130.037,272 118.844,260.807 118.844,247C118.844,233.193 130.037,222 143.844,222zM253.563,222C267.37,222 278.563,233.193 278.563,247C278.563,260.807 267.37,272 253.563,272C239.755,272 228.563,260.807 228.563,247C228.563,233.193 239.755,222 253.563,222zM363.563,222C377.37,222 388.563,233.193 388.563,247C388.563,260.807 377.37,272 363.563,272C349.755,272 338.563,260.807 338.563,247C338.563,233.193 349.755,222 363.563,222z" />
</group>
</vector>

View file

@ -837,8 +837,7 @@ public class NotificationService {
}
private void setNotificationColor(final Builder mBuilder) {
// TODO can we use themed colors?
mBuilder.setColor(ContextCompat.getColor(mXmppConnectionService, R.color.md_theme_light_primary));
mBuilder.setColor(ContextCompat.getColor(mXmppConnectionService, R.color.green_600));
}
public void updateNotification() {
@ -1181,7 +1180,7 @@ public class NotificationService {
mBuilder.setGroupSummary(true);
mBuilder.setGroup(MESSAGES_GROUP);
mBuilder.setDeleteIntent(createDeleteIntent(null));
mBuilder.setSmallIcon(R.drawable.ic_notification);
mBuilder.setSmallIcon(R.drawable.ic_app_icon_notification);
return mBuilder;
}
@ -1328,7 +1327,7 @@ public class NotificationService {
.getShortcutInfoCompat(conversation.getMucOptions());
}
notificationBuilder.setWhen(conversation.getLatestMessage().getTimeSent());
notificationBuilder.setSmallIcon(R.drawable.ic_notification);
notificationBuilder.setSmallIcon(R.drawable.ic_app_icon_notification);
notificationBuilder.setDeleteIntent(createDeleteIntent(conversation));
notificationBuilder.setContentIntent(createContentIntent(conversation));
if (channel.equals(MESSAGES_NOTIFICATION_CHANNEL)) {

View file

@ -11,6 +11,7 @@
<color name="green_100">#ffC8E6C9</color>
<color name="green_200">#ffA5D6A7</color>
<color name="green_500">#ff4CAF50</color>
<color name="green_600">#ff43A047</color>
<color name="green_700">#ff388E3C</color>
<color name="green_800">#ff2E7D32</color>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

View file

@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="21.637"
android:viewportHeight="21.637">
<group>
<path
android:fillColor="@android:color/white"
android:pathData="m10.8073,0.5a9.9285,9.9285 0,0 0,-9.9284 9.9284,9.9285 9.9285,0 0,0 9.9284,9.9286 9.9285,9.9285 0,0 0,4.4216 -1.0435l0.0133,0.0045 4.2237,1.6392c0.337,0.1308 0.7803,0.3154 1.0825,0.0284 0.2934,-0.2788 0.2244,-0.5614 0.1229,-0.9745l-1.1748,-4.7803a9.9285,9.9285 0,0 0,1.2395 -4.7992,9.9285 9.9285,0 0,0 -9.9286,-9.9285zM5.7004,8.1173a1.1946,1.1946 135,0 1,1.1944 1.1946,1.1946 1.1946,0 0,1 -1.1944,1.1944 1.1946,1.1946 135,0 1,-1.1946 -1.1944,1.1946 1.1946,0 0,1 1.1946,-1.1946zM10.9304,8.1173a1.1946,1.1946 135,0 1,1.1946 1.1946,1.1946 1.1946,0 0,1 -1.1946,1.1944 1.1946,1.1946 0,0 1,-1.1944 -1.1944,1.1946 1.1946,135 0,1 1.1944,-1.1946zM16.1818,8.1173a1.1946,1.1946 135,0 1,1.1946 1.1946,1.1946 1.1946,0 0,1 -1.1946,1.1944 1.1946,1.1946 135,0 1,-1.1946 -1.1944,1.1946 1.1946,0 0,1 1.1946,-1.1946zM4.6246,11.2577c0.8992,0 1.6282,0.8652 1.6282,1.9323 0.0672,3.9098 -1.7698,-0.1304 -3.0862,-0.0963 -0.0481,-1.2839 0.9335,-1.836 1.458,-1.836zM17.2571,11.2577c0.5245,0 1.5061,0.5521 1.458,1.836 -1.3164,-0.034 -3.1534,4.0061 -3.0862,0.0963 0,-1.0671 0.729,-1.9323 1.6282,-1.9323zM10.937,11.5584c0.3358,0.0051 0.6757,0.0485 0.9853,0.1786 0.3096,0.1301 0.5881,0.354 0.7381,0.6545 0.1078,0.216 0.1453,0.462 0.1401,0.7034 -0.0051,0.2414 -0.0514,0.48 -0.1037,0.7157 -0.0523,0.2358 -0.1111,0.4705 -0.1418,0.71 -0.0307,0.2395 -0.033,0.4856 0.0271,0.7195 0.1124,0.4392 0.454,0.8129 0.8814,0.9641 0.4274,0.1512 0.9279,0.0754 1.2915,-0.1955 -1.0722,0.9392 -2.496,1.467 -3.9213,1.4536 -1.3779,-0.013 -2.7453,-0.5302 -3.7869,-1.4323 0.3657,0.2622 0.8612,0.3326 1.2854,0.1826 0.4242,-0.15 0.7655,-0.5162 0.885,-0.9501 0.066,-0.2392 0.0673,-0.4923 0.039,-0.7388 -0.0284,-0.2465 -0.086,-0.4885 -0.1365,-0.7315 -0.0504,-0.243 -0.0942,-0.489 -0.0946,-0.7371 0,-0.2482 0.045,-0.5003 0.1629,-0.7185 0.1598,-0.2954 0.4453,-0.5101 0.7589,-0.6304 0.3136,-0.1203 0.6545,-0.1529 0.9903,-0.1477z" />
</group>
</vector>

View file

@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="18dp"
android:height="18dp"
android:tint="?colorControlNormal"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M7,10l5,5 5,-5z" />
</vector>

View file

@ -55,7 +55,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:cursorVisible="false"
android:drawableEnd="@drawable/ic_arrow_drop_down_black_18dp"
android:drawableEnd="@drawable/ic_arrow_drop_down_18dp"
android:focusable="false"
android:gravity="bottom|center_horizontal"
android:imeOptions="flagNoExtractUi"