Android notification icon color is not changed when background color is white
<p>I upgraded android 6.0 and my app have problem.</p>
<p>when the status bar background color is not white, notification icon is good.
(notification icon png has white and alpha only)</p>
<p>but if some apps change background color to white, my notification icon isn't inverted to black.</p>
<p>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.)</p>
<p>below image shows a problem.</p>
<p><strong>normal status</strong>
<a href="https://i.stack.imgur.com/LbOgB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LbOgB.png" alt="normal status image" /></a></p>
<p><strong>when changed background color to white, my icon is not changed to black only</strong>
<a href="https://i.stack.imgur.com/p0Dp8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/p0Dp8.png" alt="with white background color image" /></a></p>
<ul>
<li><p>Notification build code</p>
<pre><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());
</code></pre>
</li>
<li><p>values-v23/styles.xml</p>
<pre><code>  &lt;style name=&quot;AppTheme&quot; parent=&quot;android:Theme.Material.NoActionBar&quot;&gt;            
  &lt;/style&gt;
</code></pre>
</li>
</ul>
<p><strong>Found a solution</strong></p>
<p>I added notification icons to drawable directory not drawable-*dpi. Now it's working.</p>