The Android Developer Challenge is back! Submit your idea before December 2.

BlendModeColorFilterCompat

public class BlendModeColorFilterCompat
extends Object

java.lang.Object
   ↳ androidx.core.graphics.BlendModeColorFilterCompat


Helper for accessing ColorFilter APIs on various API levels of the platform

Summary

Public methods

static ColorFilter createBlendModeColorFilterCompat(int color, BlendModeCompat blendModeCompat)

Convenience method to create ColorFilter in a backward compatible way.

Inherited methods

Public methods

createBlendModeColorFilterCompat

public static ColorFilter createBlendModeColorFilterCompat (int color, 
                BlendModeCompat blendModeCompat)

Convenience method to create ColorFilter in a backward compatible way. This method falls back on PorterDuffColorFilter for API levels that do not support BlendModeColorFilter. This method returns null if the BlendMode provided is not supported on a given API level.

Parameters
color int

blendModeCompat BlendModeCompat

Returns
ColorFilter