NinePatchDrawable
open class NinePatchDrawable : Drawable
| kotlin.Any | ||
| ↳ | android.graphics.drawable.Drawable | |
| ↳ | android.graphics.drawable.NinePatchDrawable | |
A resizeable bitmap, with stretchable areas that you define. This type of image is defined in a .png file with a special format.
Summary
| Public constructors | |
|---|---|
NinePatchDrawable(res: Resources!, bitmap: Bitmap!, chunk: ByteArray!, padding: Rect!, srcName: String!)Create drawable from raw nine-patch data, setting initial target density based on the display metrics of the resources. |
|
NinePatchDrawable(res: Resources?, patch: NinePatch)Create drawable from existing nine-patch, setting initial target density based on the display metrics of the resources. |
|
NinePatchDrawable(bitmap: Bitmap!, chunk: ByteArray!, padding: Rect!, srcName: String!)Create drawable from raw nine-patch data, not dealing with density. |
|
NinePatchDrawable(patch: NinePatch)Create drawable from existing nine-patch, not dealing with density. |
|
| Public methods | |
|---|---|
| open Unit |
Applies the specified theme to this Drawable and its children. |
| open Boolean | |
| open Unit |
Draw in its bounds (set via setBounds) respecting optional effects such as alpha (set via setAlpha) and color filter (set via setColorFilter). |
| open Int |
getAlpha()Gets the current alpha value for the drawable. |
| open Int |
Return a mask of the configuration parameters for which this drawable may change, requiring that it be re-created. |
| open Drawable.ConstantState? |
Return a |
| open Int |
Returns the drawable's intrinsic height. |
| open Int |
Returns the drawable's intrinsic width. |
| open Int |
Return the opacity/transparency of this Drawable. |
| open Insets |
Return in insets the layout insets suggested by this Drawable for use with alignment operations during layout. |
| open Unit |
getOutline(outline: Outline)Called to get the drawable to populate the Outline that defines its drawing area. |
| open Boolean |
getPadding(padding: Rect)Return in padding the insets suggested by this Drawable for placing content inside the drawable's bounds. |
| open Paint |
getPaint() |
| open Region? |
Returns a Region representing the part of the Drawable that is completely transparent. |
| open Boolean |
Indicates whether this drawable has at least one state spec explicitly specifying |
| open Unit |
inflate(r: Resources, parser: XmlPullParser, attrs: AttributeSet, theme: Resources.Theme?)Inflate this Drawable from an XML resource optionally styled by a theme. |
| open Boolean |
Tells if this Drawable will be automatically mirrored when its layout direction is RTL right-to-left. |
| open Boolean | |
| open Boolean |
Indicates whether this drawable will change its appearance based on state. |
| open Drawable |
mutate()Make this drawable mutable. |
| open Unit |
Specify an alpha value for the drawable. |
| open Unit |
setAutoMirrored(mirrored: Boolean)Set whether this Drawable is automatically mirrored when its layout direction is RTL (right-to left). |
| open Unit |
setColorFilter(colorFilter: ColorFilter?)Specify an optional color filter for the drawable. |
| open Unit |
Set to true to have the drawable dither its colors when drawn to a device with fewer than 8-bits per color component. |
| open Unit |
setFilterBitmap(filter: Boolean)Set to true to have the drawable filter its bitmaps with bilinear sampling when they are scaled or rotated. |
| open Unit |
setTargetDensity(canvas: Canvas)Set the density scale at which this drawable will be rendered. |
| open Unit |
setTargetDensity(metrics: DisplayMetrics)Set the density scale at which this drawable will be rendered. |
| open Unit |
setTargetDensity(density: Int)Set the density at which this drawable will be rendered. |
| open Unit |
setTintBlendMode(blendMode: BlendMode?)Specifies a tint blending mode for this drawable. |
| open Unit |
setTintList(tint: ColorStateList?)Specifies tint color for this drawable as a color state list. |
| Protected methods | |
|---|---|
| open Boolean |
onStateChange(stateSet: IntArray)Override this in your subclass to change appearance if you recognize the specified state. |
| Inherited functions | |
|---|---|