Stay organized with collections
Save and categorize content based on your preferences.
DrawableAlphaProperty
public
class
DrawableAlphaProperty
extends Property<Drawable, Integer>
java.lang.Object
|
↳ |
android.util.Property<android.graphics.drawable.Drawable, java.lang.Integer>
|
|
↳ |
com.google.android.material.animation.DrawableAlphaProperty
|
Compat property for Drawable.getAlpha()
and Drawable.setAlpha(int)
for pre-K
devices.
Summary
Public methods |
Integer
|
get(Drawable object)
|
void
|
set(Drawable object, Integer value)
|
Inherited methods |
From class
android.util.Property
abstract
Integer
|
get(Drawable arg0)
|
String
|
getName()
|
Class<Integer>
|
getType()
|
boolean
|
isReadOnly()
|
static
<T, V>
Property<Drawable, Integer>
|
of(Class<Drawable> arg0, Class<Integer> arg1, String arg2)
|
void
|
set(Drawable arg0, Integer arg1)
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Fields
Public methods
get
public Integer get (Drawable object)
Parameters |
object |
Drawable |
set
public void set (Drawable object,
Integer value)
Parameters |
object |
Drawable |
value |
Integer |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# DrawableAlphaProperty\n\nSummary: [Fields](#lfields) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nDrawableAlphaProperty\n=====================\n\n\n`\npublic\n\n\nclass\nDrawableAlphaProperty\n`\n\n\n`\n\n\n`\n\n`\n\nextends Property\u003cDrawable, Integer\u003e\n\n\n`\n\n`\n\n\n`\n\n|---|---|-------------------------------------------------------------|\n| java.lang.Object |||\n| ↳ | android.util.Property\\\u003candroid.graphics.drawable.Drawable, java.lang.Integer\\\u003e ||\n| | ↳ | com.google.android.material.animation.DrawableAlphaProperty |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nCompat property for [Drawable.getAlpha()](/reference/android/graphics/drawable/Drawable#getAlpha()) and [Drawable.setAlpha(int)](/reference/android/graphics/drawable/Drawable#setAlpha(int)) for pre-K\ndevices.\n\nSummary\n-------\n\n| ### Fields ||\n|----------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` public static final Property\u003cDrawable, Integer\u003e` | [DRAWABLE_ALPHA_COMPAT](/reference/com/google/android/material/animation/DrawableAlphaProperty#DRAWABLE_ALPHA_COMPAT) A compat Property wrapper around [Drawable.getAlpha()](/reference/android/graphics/drawable/Drawable#getAlpha()) and [Drawable.setAlpha(int)](/reference/android/graphics/drawable/Drawable#setAlpha(int)). |\n\n| ### Public methods ||\n|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` Integer` | ` `[get](/reference/com/google/android/material/animation/DrawableAlphaProperty#get(android.graphics.drawable.Drawable))`(Drawable object) ` |\n| ` void` | ` `[set](/reference/com/google/android/material/animation/DrawableAlphaProperty#set(android.graphics.drawable.Drawable,%20java.lang.Integer))`(Drawable object, Integer value) ` |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` android.util.Property ` |----------------------------------------------|----------------------------------------------------------------| | ` abstract Integer` | ` get(Drawable arg0) ` | | ` String` | ` getName() ` | | ` Class\u003cInteger\u003e` | ` getType() ` | | ` boolean` | ` isReadOnly() ` | | ` static \u003cT, V\u003e Property\u003cDrawable, Integer\u003e` | ` of(Class\u003cDrawable\u003e arg0, Class\u003cInteger\u003e arg1, String arg2) ` | | ` void` | ` set(Drawable arg0, Integer arg1) ` | ||\n| From class ` java.lang.Object ` |-------------------|-------------------------------| | ` Object` | ` clone() ` | | ` boolean` | ` equals(Object arg0) ` | | ` void` | ` finalize() ` | | ` final Class\u003c?\u003e` | ` getClass() ` | | ` int` | ` hashCode() ` | | ` final void` | ` notify() ` | | ` final void` | ` notifyAll() ` | | ` String` | ` toString() ` | | ` final void` | ` wait(long arg0, int arg1) ` | | ` final void` | ` wait(long arg0) ` | | ` final void` | ` wait() ` | ||\n\nFields\n------\n\n### DRAWABLE_ALPHA_COMPAT\n\n```\npublic static final Property\u003cDrawable, Integer\u003e DRAWABLE_ALPHA_COMPAT\n```\n\nA compat Property wrapper around [Drawable.getAlpha()](/reference/android/graphics/drawable/Drawable#getAlpha()) and [Drawable.setAlpha(int)](/reference/android/graphics/drawable/Drawable#setAlpha(int)).\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### get\n\n```\npublic Integer get (Drawable object)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|-------------------|\n| `object` | `Drawable` \u003cbr /\u003e |\n\n| Returns ||\n|-----------|--------|\n| `Integer` | \u003cbr /\u003e |\n\n### set\n\n```\npublic void set (Drawable object, \n Integer value)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|-------------------|\n| `object` | `Drawable` \u003cbr /\u003e |\n| `value` | `Integer` \u003cbr /\u003e |"]]