Android 5+ custom notification XML layout with RemoteViews, set correct icon tint for ImageButton

Try this example :

Definition for notification :

// Declare variable
public static Bitmap icon;

// Assign value but this line can be different depends on current 
// android sdk vesion ...
icon = BitmapFactory.decodeResource(getApplicationContext().getResources(), R.drawable.YOUR_IMAGE);

     mBuilder = new NotificationCompat.Builder(this);
     mBuilder.setShowWhen(false);
     mBuilder.setDefaults(Notification.DEFAULT_ALL);
     mBuilder.setVisibility(NotificationCompat.VISIBILITY_PUBLIC);
     mBuilder.setSmallIcon(R.drawable.image1); // One way to load img
     mBuilder.setContentText("this text not visible");
     mBuilder.setLargeIcon(icon);// This is the line
     mBuilder.setPriority(Notification.PRIORITY_DEFAULT);
     mBuilder.setContent(contentNotifySmall); // ORI
     //mBuilder.setAutoCancel(false);
     mBuilder.setCustomBigContentView(contentNotify);

I setup small and big variant for any case , this is important.


Sorry, But as per my knowledge custom ROM's have separate system designs,configurations and that are not official as well.

So,supporting Custom ROM without knowledge about its design is not possible. And android APIs are for supporting official ROM's.

Hope it Helps!!