LayerDrawable Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A Drawable that manages an array of other Drawables.
[Android.Runtime.Register("android/graphics/drawable/LayerDrawable", DoNotGenerateAcw=true)]
public class LayerDrawable : Android.Graphics.Drawables.Drawable, Android.Graphics.Drawables.Drawable.ICallback, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/graphics/drawable/LayerDrawable", DoNotGenerateAcw=true)>]
type LayerDrawable = class
inherit Drawable
interface Drawable.ICallback
interface IJavaObject
interface IDisposable
interface IJavaPeerable
- Inheritance
- Derived
- Attributes
- Implements
A Drawable that manages an array of other Drawables. These are drawn in array order, so the element with the largest index will be drawn on top.
It can be defined in an XML file with the <layer-list>
element. Each Drawable in the layer is defined in a nested <item>
.
For more information, see the guide to Drawable Resources.
Java documentation for android.graphics.drawable.LayerDrawable
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Layer |
Creates a new layer drawable with the list of specified layers. |
Layer |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
Inset |
Value used for undefined start and end insets. |
Padding |
Obsolete.
Padding mode used to nest each layer inside the padding of the previous layer. |
Padding |
Obsolete.
Padding mode used to stack each layer directly atop the previous layer. |
Alpha |
Gets the current alpha value for the drawable. (Inherited from Drawable) |
Auto |
Tells if this Drawable will be automatically mirrored when its layout direction is RTL right-to-left. -or- Set whether this Drawable is automatically mirrored when its layout direction is RTL (right-to left). (Inherited from Drawable) |
Bottom |
Returns the bottom padding in pixels. |
Bounds |
Return the drawable's bounds Rect. -or- Specify a bounding rectangle for the Drawable. (Inherited from Drawable) |
Callback |
Return the current |
Changing |
Return a mask of the configuration parameters for which this drawable may change, requiring that it be re-created. -or- Set a mask of the configuration parameters for which this drawable may change, requiring that it be re-created. (Inherited from Drawable) |
Class |
Returns the runtime class of this |
Color |
Returns the current color filter, or |
Current | (Inherited from Drawable) |
Dirty |
Return the drawable's dirty bounds Rect. (Inherited from Drawable) |
End |
Returns the end padding in pixels. |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
Has |
Indicates whether this drawable has at least one state spec explicitly
specifying |
Intrinsic |
Returns the drawable's intrinsic height. (Inherited from Drawable) |
Intrinsic |
Returns the drawable's intrinsic width. (Inherited from Drawable) |
Is |
(Inherited from Drawable) |
Is |
Whether this drawable requests projection. (Inherited from Drawable) |
Is |
Indicates whether this drawable will change its appearance based on state. (Inherited from Drawable) |
Is |
(Inherited from Drawable) |
Jni |
(Inherited from Object) |
Jni |
|
Layout |
Returns the resolved layout direction for this Drawable. (Inherited from Drawable) |
Left |
Returns the left padding in pixels. |
Level |
Retrieve the current level. (Inherited from Drawable) |
Minimum |
Returns the minimum height suggested by this Drawable. (Inherited from Drawable) |
Minimum |
Returns the minimum width suggested by this Drawable. (Inherited from Drawable) |
Number |
Returns the number of layers contained within this layer drawable. |
Opacity |
Return the opacity/transparency of this Drawable. |
Optical |
Return in insets the layout insets suggested by this Drawable for use with alignment operations during layout. (Inherited from Drawable) |
Padding |
Specifies how layer padding should affect the bounds of subsequent layers. |
Peer |
(Inherited from Object) |
Right |
Returns the right padding in pixels. |
Start |
Returns the start padding in pixels. |
Threshold |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
Threshold |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
Top |
Returns the top padding in pixels. |
Transparent |
Returns a Region representing the part of the Drawable that is completely transparent. (Inherited from Drawable) |
Add |
Adds a new layer containing the specified |
Apply |
Applies the specified theme to this Drawable and its children. (Inherited from Drawable) |
Can |
(Inherited from Drawable) |
Clear |
Removes the color filter for this drawable. (Inherited from Drawable) |
Clone() |
Creates and returns a copy of this object. (Inherited from Object) |
Copy |
Return a copy of the drawable's bounds in a new Rect. (Inherited from Drawable) |
Copy |
Return a copy of the drawable's bounds in the specified Rect (allocated by the caller). (Inherited from Drawable) |
Dispose() | (Inherited from Object) |
Dispose(Boolean) | (Inherited from Object) |
Draw(Canvas) |
Draw in its bounds (set via setBounds) respecting optional effects such as alpha (set via setAlpha) and color filter (set via setColorFilter). |
Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
Find |
Looks for a layer with the given ID and returns its |
Find |
Returns the layer with the specified |
Get |
Return a |
Get |
Returns the drawable for the layer at the specified index. |
Get |
Returns a hash code value for the object. (Inherited from Object) |
Get |
Populates |
Get |
Returns the ID of the specified layer. |
Get |
|
Get |
|
Get |
|
Get |
|
Get |
|
Get |
|
Get |
|
Get |
|
Get |
|
Get |
Called to get the drawable to populate the Outline that defines its drawing area. (Inherited from Drawable) |
Get |
Return in padding the insets suggested by this Drawable for placing content inside the drawable's bounds. (Inherited from Drawable) |
Get |
Describes the current state, as a union of primitve states, such as
|
Inflate(Resources, Xml |
Inflate this Drawable from an XML resource. (Inherited from Drawable) |
Inflate(Resources, Xml |
Inflate this Drawable from an XML resource. (Inherited from Drawable) |
Inflate |
(Inherited from Drawable) |
Inflate |
(Inherited from Drawable) |
Invalidate |
Called when the drawable needs to be redrawn. |
Invalidate |
Use the current |
Java |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. (Inherited from Object) |
Jump |
If this Drawable does transition animations between states, ask that it immediately jump to the current state and skip any active animations. (Inherited from Drawable) |
Mutate() |
Make this drawable mutable. (Inherited from Drawable) |
Notify() |
Wakes up a single thread that is waiting on this object's monitor. (Inherited from Object) |
Notify |
Wakes up all threads that are waiting on this object's monitor. (Inherited from Object) |
On |
Override this in your subclass to change appearance if you vary based on the bounds. (Inherited from Drawable) |
On |
Called when the drawable's resolved layout direction changes. (Inherited from Drawable) |
On |
Override this in your subclass to change appearance if you vary based on level. (Inherited from Drawable) |
On |
Override this in your subclass to change appearance if you recognize the specified state. (Inherited from Drawable) |
Schedule |
|
Schedule |
A Drawable can call this to schedule the next frame of its animation. |
Schedule |
(Inherited from Drawable) |
Schedule |
Use the current |
Set |
Specify an alpha value for the drawable. 0 means fully transparent, and 255 means fully opaque. |
Set |
Specify a bounding rectangle for the Drawable. (Inherited from Drawable) |
Set |
Bind a |
Set |
Specify a color and Porter-Duff mode to be the color filter for this drawable. (Inherited from Drawable) |
Set |
Specify an optional color filter for the drawable. |
Set |
Set to true to have the drawable dither its colors when drawn to a device with fewer than 8-bits per color component. (Inherited from Drawable) |
Set |
Sets the drawable for the layer at the specified index. |
Set |
Replaces the |
Set |
Set to true to have the drawable filter its bitmaps with bilinear sampling when they are scaled or rotated. (Inherited from Drawable) |
Set |
Sets the Handle property. (Inherited from Object) |
Set |
Specifies the hotspot's location within the drawable. (Inherited from Drawable) |
Set |
Sets the bounds to which the hotspot is constrained, if they should be different from the drawable bounds. (Inherited from Drawable) |
Set |
Sets the ID of a layer. |
Set |
Sets the gravity used to position or stretch the specified layer within its container. |
Set |
|
Set |
Specifies the insets in pixels for the drawable at the specified index. |
Set |
|
Set |
|
Set |
|
Set |
Specifies the relative insets in pixels for the drawable at the specified index. |
Set |
|
Set |
|
Set |
|
Set |
Sets an explicit size for the specified layer. |
Set |
|
Set |
Set the layout direction for this drawable. (Inherited from Drawable) |
Set |
Specify the level for the drawable. (Inherited from Drawable) |
Set |
Sets the opacity of this drawable directly instead of collecting the states from the layers. |
Set |
Sets the absolute padding. |
Set |
Sets the relative padding. |
Set |
Specify a set of states for the drawable. (Inherited from Drawable) |
Set |
Specifies tint color for this drawable. (Inherited from Drawable) |
Set |
Specifies a tint blending mode for this drawable. (Inherited from Drawable) |
Set |
Specifies tint color for this drawable as a color state list. (Inherited from Drawable) |
Set |
Specifies a tint blending mode for this drawable. (Inherited from Drawable) |
Set |
Set whether this Drawable is visible. (Inherited from Drawable) |
To |
(Inherited from Object) |
To |
Returns a string representation of the object. (Inherited from Object) |
Unregister |
(Inherited from Object) |
Unschedule |
|
Unschedule |
A Drawable can call this to unschedule an action previously scheduled with Drawable.ICallback. |
Unschedule |
(Inherited from Drawable) |
Unschedule |
Use the current |
Wait() |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>. (Inherited from Object) |
Wait(Int64, Int32) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Wait(Int64) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
IJava |
(Inherited from Object) |
IJava |
(Inherited from Object) |
IJava |
(Inherited from Object) |
IJava |
(Inherited from Object) |
IJava |
(Inherited from Object) |
IJava |
(Inherited from Object) |
IJava |
(Inherited from Object) |
Java |
Performs an Android runtime-checked type conversion. |
Java |
|
Get |