Skip to content

Most visited

Recently visited

navigation
added in version 24.1.0
belongs to Maven artifact com.android.support:support-compat:27.0.0

TintableBackgroundView

public interface TintableBackgroundView

android.support.v4.view.TintableBackgroundView
Known Indirect Subclasses


Interface which allows a View to receive background tinting calls from ViewCompat when running on API v20 devices or lower.

Summary

Public methods

abstract ColorStateList getSupportBackgroundTintList()

Return the tint applied to the background drawable, if specified.

abstract PorterDuff.Mode getSupportBackgroundTintMode()

Return the blending mode used to apply the tint to the background drawable, if specified.

abstract void setSupportBackgroundTintList(ColorStateList tint)

Applies a tint to the background drawable.

abstract void setSupportBackgroundTintMode(PorterDuff.Mode tintMode)

Specifies the blending mode used to apply the tint specified by setSupportBackgroundTintList(ColorStateList)} to the background drawable.

Public methods

getSupportBackgroundTintList

added in version 24.1.0
ColorStateList getSupportBackgroundTintList ()

Return the tint applied to the background drawable, if specified.

Returns
ColorStateList the tint applied to the background drawable

getSupportBackgroundTintMode

added in version 24.1.0
PorterDuff.Mode getSupportBackgroundTintMode ()

Return the blending mode used to apply the tint to the background drawable, if specified.

Returns
PorterDuff.Mode the blending mode used to apply the tint to the background drawable

setSupportBackgroundTintList

added in version 24.1.0
void setSupportBackgroundTintList (ColorStateList tint)

Applies a tint to the background drawable. Does not modify the current tint mode, which is SRC_IN by default.

Subsequent calls to View.setBackground(Drawable) will automatically mutate the drawable and apply the specified tint and tint mode.

Parameters
tint ColorStateList: the tint to apply, may be null to clear tint

See also:

setSupportBackgroundTintMode

added in version 24.1.0
void setSupportBackgroundTintMode (PorterDuff.Mode tintMode)

Specifies the blending mode used to apply the tint specified by setSupportBackgroundTintList(ColorStateList)} to the background drawable. The default mode is SRC_IN.

Parameters
tintMode PorterDuff.Mode: the blending mode used to apply the tint, may be null to clear tint

See also:

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience. (Dec 2017 Android Platform & Tools Survey)