mirror of
https://github.com/nextcloud/android.git
synced 2024-11-25 14:45:47 +03:00
improve notification icon dark theming
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
080dc4047f
commit
ed229267d2
2 changed files with 10 additions and 2 deletions
|
@ -20,7 +20,10 @@
|
||||||
package com.owncloud.android.ui.adapter;
|
package com.owncloud.android.ui.adapter;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.res.Configuration;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.PorterDuff;
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
import android.graphics.drawable.PictureDrawable;
|
import android.graphics.drawable.PictureDrawable;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
@ -135,11 +138,17 @@ public class NotificationListAdapter extends RecyclerView.Adapter<NotificationLi
|
||||||
|
|
||||||
holder.message.setText(notification.getMessage());
|
holder.message.setText(notification.getMessage());
|
||||||
|
|
||||||
// Todo set proper action icon (to be clarified how to pick)
|
|
||||||
if (!TextUtils.isEmpty(notification.getIcon())) {
|
if (!TextUtils.isEmpty(notification.getIcon())) {
|
||||||
downloadIcon(notification.getIcon(), holder.icon);
|
downloadIcon(notification.getIcon(), holder.icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int nightModeFlag = notificationsActivity.getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
|
||||||
|
if (Configuration.UI_MODE_NIGHT_YES == nightModeFlag) {
|
||||||
|
holder.icon.setColorFilter(Color.WHITE, PorterDuff.Mode.SRC_IN);
|
||||||
|
} else {
|
||||||
|
holder.icon.setColorFilter(Color.BLACK, PorterDuff.Mode.SRC_IN);
|
||||||
|
}
|
||||||
|
|
||||||
setButtons(holder, notification);
|
setButtons(holder, notification);
|
||||||
|
|
||||||
holder.dismiss.setOnClickListener(v -> new DeleteNotificationTask(client, notification, holder,
|
holder.dismiss.setOnClickListener(v -> new DeleteNotificationTask(client, notification, holder,
|
||||||
|
|
|
@ -38,7 +38,6 @@
|
||||||
android:layout_marginEnd="@dimen/notification_icon_layout_right_end_margin"
|
android:layout_marginEnd="@dimen/notification_icon_layout_right_end_margin"
|
||||||
android:padding="2dp"
|
android:padding="2dp"
|
||||||
android:alpha="0.5"
|
android:alpha="0.5"
|
||||||
android:background="@drawable/round_bgnd_icons"
|
|
||||||
android:contentDescription="@string/notification_icon"
|
android:contentDescription="@string/notification_icon"
|
||||||
android:src="@drawable/ic_notification" />
|
android:src="@drawable/ic_notification" />
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue