I upgraded android 6.0 and my app have problem.
when the status bar background color is not white, notification icon is good. (notification icon png has white and alpha only)
but if some apps change background color to white, my notification icon isn't inverted to black.
How can I invert white notification icon to black when status bar background color set white by other app? (I'm not saying how can I use color icon.)
below image shows a problem.
when changed background color to white, my icon is not changed to black only
Notification build code
Notification.Builder mBuilder = new Notification.Builder(context) .setSmallIcon(R.drawable.ic_notifications_none) .setPriority(priority2) .setOngoing(true); mBuilder.setContent(generateMessageView(message)); Intent notificationIntent = new Intent(context, MainActivity.class); notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); PendingIntent intent = PendingIntent.getActivity(context, 0, notificationIntent, 0); NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); mBuilder.setContentIntent(intent); mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());
values-v23/styles.xml
<style name="AppTheme" parent="android:Theme.Material.NoActionBar"> </style>
Found a solution
I added notification icons to drawable directory not drawable-*dpi. Now it's working.