mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 07:05:49 +03:00
Add ownCloud color to notifications (only works on lollipop and up) for progress bar and icon background
This commit is contained in:
parent
92c39be013
commit
796b1bd297
2 changed files with 3 additions and 1 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue