CompoundButtonCompat
class CompoundButtonCompat
Helper for accessing CompoundButton.
Summary
Public functions |
|
|---|---|
java-static Drawable? |
getButtonDrawable(button: CompoundButton)Returns the drawable used as the compound button image |
java-static ColorStateList? |
getButtonTintList(button: CompoundButton)Returns the tint applied to the button drawable |
java-static PorterDuff.Mode? |
getButtonTintMode(button: CompoundButton)name android:buttonTintMode |
java-static Unit |
setButtonTintList(button: CompoundButton, tint: ColorStateList?)Applies a tint to the button drawable. |
java-static Unit |
setButtonTintMode(button: CompoundButton, tintMode: PorterDuff.Mode?)Specifies the blending mode used to apply the tint specified by |
Public functions
getButtonDrawable
java-static fun getButtonDrawable(button: CompoundButton): Drawable?
Returns the drawable used as the compound button image
| See also | |
|---|---|
setButtonDrawable |
getButtonTintList
java-static fun getButtonTintList(button: CompoundButton): ColorStateList?
Returns the tint applied to the button drawable
| See also | |
|---|---|
setButtonTintList |
getButtonTintMode
java-static fun getButtonTintMode(button: CompoundButton): PorterDuff.Mode?
name android:buttonTintMode
| Returns | |
|---|---|
PorterDuff.Mode? |
the blending mode used to apply the tint to the button drawable |
| See also | |
|---|---|
setButtonTintMode |
setButtonTintList
java-static fun setButtonTintList(button: CompoundButton, tint: ColorStateList?): Unit
Applies a tint to the button drawable. Does not modify the current tint mode, which is SRC_IN by default.
Subsequent calls to setButtonDrawable should automatically mutate the drawable and apply the specified tint and tint mode using setTintList.
| Parameters | |
|---|---|
button: CompoundButton |
button for which to apply the tint. |
tint: ColorStateList? |
the tint to apply, may be |
| See also | |
|---|---|
setButtonTintList |
setButtonTintMode
java-static fun setButtonTintMode(button: CompoundButton, tintMode: PorterDuff.Mode?): Unit
Specifies the blending mode used to apply the tint specified by setButtonTintList} to the button drawable. The default mode is SRC_IN.
| Parameters | |
|---|---|
button: CompoundButton |
button for which to apply the tint mode. |
tintMode: PorterDuff.Mode? |
the blending mode used to apply the tint, may be |
| See also | |
|---|---|
getButtonTintMode |
|
setTintMode |