Google 致力于为黑人社区推动种族平等。查看具体举措

BlendModeColorFilterCompat

open class BlendModeColorFilterCompat
kotlin.Any
   ↳ androidx.core.graphics.BlendModeColorFilterCompat

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

Summary

Public methods
open static ColorFilter?
createBlendModeColorFilterCompat(color: Int, @NonNull blendModeCompat: BlendModeCompat)

Convenience method to create ColorFilter in a backward compatible way.

Public methods

createBlendModeColorFilterCompat

@Nullable open static fun createBlendModeColorFilterCompat(
    color: Int,
    @NonNull blendModeCompat: BlendModeCompat
): ColorFilter?

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.