Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

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