Add ownCloud color to notifications (only works on lollipop and up) for progress bar and icon background

This commit is contained in:
Andy Scherzinger 2015-09-27 21:40:52 +02:00
parent 92c39be013
commit 796b1bd297
2 changed files with 3 additions and 1 deletions

View file

@ -55,7 +55,8 @@ public class NotificationBuilderWithProgressBar extends NotificationCompat.Build
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
return new NotificationBuilderWithProgressBar(context);
} else {
return new NotificationCompat.Builder(context);
return new NotificationCompat.Builder(context).
setColor(context.getResources().getColor(R.color.primary));
}
}

View file

@ -526,6 +526,7 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter {
private NotificationCompat.Builder createNotificationBuilder() {
NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(getContext());
notificationBuilder.setSmallIcon(R.drawable.notification_icon).setAutoCancel(true);
notificationBuilder.setColor(getContext().getResources().getColor(R.color.primary));
return notificationBuilder;
}