/**@class android.graphics.drawable.GradientDrawable @extends android.graphics.drawable.Drawable A Drawable with a color gradient for buttons, backgrounds, etc. <p>It can be defined in an XML file with the <code><shape></code> element. For more information, see the guide to <a href="{@docRoot}guide/topics/resources/drawable-resource.html">Drawable Resources</a>.</p> @attr ref android.R.styleable#GradientDrawable_visible @attr ref android.R.styleable#GradientDrawable_shape @attr ref android.R.styleable#GradientDrawable_innerRadiusRatio @attr ref android.R.styleable#GradientDrawable_innerRadius @attr ref android.R.styleable#GradientDrawable_thicknessRatio @attr ref android.R.styleable#GradientDrawable_thickness @attr ref android.R.styleable#GradientDrawable_useLevel @attr ref android.R.styleable#GradientDrawableSize_width @attr ref android.R.styleable#GradientDrawableSize_height @attr ref android.R.styleable#GradientDrawableGradient_startColor @attr ref android.R.styleable#GradientDrawableGradient_centerColor @attr ref android.R.styleable#GradientDrawableGradient_endColor @attr ref android.R.styleable#GradientDrawableGradient_useLevel @attr ref android.R.styleable#GradientDrawableGradient_angle @attr ref android.R.styleable#GradientDrawableGradient_type @attr ref android.R.styleable#GradientDrawableGradient_centerX @attr ref android.R.styleable#GradientDrawableGradient_centerY @attr ref android.R.styleable#GradientDrawableGradient_gradientRadius @attr ref android.R.styleable#GradientDrawableSolid_color @attr ref android.R.styleable#GradientDrawableStroke_width @attr ref android.R.styleable#GradientDrawableStroke_color @attr ref android.R.styleable#GradientDrawableStroke_dashWidth @attr ref android.R.styleable#GradientDrawableStroke_dashGap @attr ref android.R.styleable#GradientDrawablePadding_left @attr ref android.R.styleable#GradientDrawablePadding_top @attr ref android.R.styleable#GradientDrawablePadding_right @attr ref android.R.styleable#GradientDrawablePadding_bottom */ var GradientDrawable = { /** Shape is a rectangle, possibly with rounded corners */ RECTANGLE : "0", /** Shape is an ellipse */ OVAL : "1", /** Shape is a line */ LINE : "2", /** Shape is a ring. */ RING : "3", /** Gradient is linear (default.) */ LINEAR_GRADIENT : "0", /** Gradient is circular. */ RADIAL_GRADIENT : "1", /** Gradient is a sweep. */ SWEEP_GRADIENT : "2", /** */ getPadding : function( ) {}, /**Specifies radii for each of the 4 corners. For each corner, the array contains 2 values, <code>[X_radius, Y_radius]</code>. The corners are ordered top-left, top-right, bottom-right, bottom-left. This property is honored only when the shape is of type {@link #RECTANGLE}. <p> <strong>Note</strong>: changing this property will affect all instances of a drawable loaded from a resource. It is recommended to invoke {@link #mutate}() before changing this property. @param {Object {float[]}} radii an array of length >= 8 containing 4 pairs of X and Y radius for each corner, specified in pixels @see #mutate() @see #setShape(int) @see #setCornerRadius(float) */ setCornerRadii : function( ) {}, /**Returns the radii for each of the 4 corners. For each corner, the array contains 2 values, <code>[X_radius, Y_radius]</code>. The corners are ordered top-left, top-right, bottom-right, bottom-left. <p> If the radius was previously set with {@link #setCornerRadius}(float), or if the corners are not rounded, this method will return {@code null}. @return {Number} an array containing the radii for each of the 4 corners, or {@code null} @see #setCornerRadii(float[]) */ getCornerRadii : function( ) {}, /**Specifies the radius for the corners of the gradient. If this is > 0, then the drawable is drawn in a round-rectangle, rather than a rectangle. This property is honored only when the shape is of type {@link #RECTANGLE}. <p> <strong>Note</strong>: changing this property will affect all instances of a drawable loaded from a resource. It is recommended to invoke {@link #mutate}() before changing this property. @param {Number} radius The radius in pixels of the corners of the rectangle shape @see #mutate() @see #setCornerRadii(float[]) @see #setShape(int) */ setCornerRadius : function( ) {}, /**Returns the radius for the corners of the gradient, that was previously set with {@link #setCornerRadius}(float). <p> If the radius was previously cleared via passing {@code null} to {@link #setCornerRadii(float[])}, this method will return 0. @return {Number} the radius in pixels of the corners of the rectangle shape, or 0 @see #setCornerRadius */ getCornerRadius : function( ) {}, /**<p>Set the stroke width and color for the drawable. If width is zero, then no stroke is drawn.</p> <p><strong>Note</strong>: changing this property will affect all instances of a drawable loaded from a resource. It is recommended to invoke {@link #mutate}() before changing this property.</p> @param {Number} width The width in pixels of the stroke @param {Number} color The color of the stroke @see #mutate() @see #setStroke(int, int, float, float) */ setStroke : function( ) {}, /**<p>Set the stroke width and color state list for the drawable. If width is zero, then no stroke is drawn.</p> <p><strong>Note</strong>: changing this property will affect all instances of a drawable loaded from a resource. It is recommended to invoke {@link #mutate}() before changing this property.</p> @param {Number} width The width in pixels of the stroke @param {Object {ColorStateList}} colorStateList The color state list of the stroke @see #mutate() @see #setStroke(int, ColorStateList, float, float) */ setStroke : function( ) {}, /**<p>Set the stroke width and color for the drawable. If width is zero, then no stroke is drawn. This method can also be used to dash the stroke.</p> <p><strong>Note</strong>: changing this property will affect all instances of a drawable loaded from a resource. It is recommended to invoke {@link #mutate}() before changing this property.</p> @param {Number} width The width in pixels of the stroke @param {Number} color The color of the stroke @param {Number} dashWidth The length in pixels of the dashes, set to 0 to disable dashes @param {Number} dashGap The gap in pixels between dashes @see #mutate() @see #setStroke(int, int) */ setStroke : function( ) {}, /**<p>Set the stroke width and color state list for the drawable. If width is zero, then no stroke is drawn. This method can also be used to dash the stroke.</p> <p><strong>Note</strong>: changing this property will affect all instances of a drawable loaded from a resource. It is recommended to invoke {@link #mutate}() before changing this property.</p> @param {Number} width The width in pixels of the stroke @param {Object {ColorStateList}} colorStateList The color state list of the stroke @param {Number} dashWidth The length in pixels of the dashes, set to 0 to disable dashes @param {Number} dashGap The gap in pixels between dashes @see #mutate() @see #setStroke(int, ColorStateList) */ setStroke : function( ) {}, /**<p>Sets the size of the shape drawn by this drawable.</p> <p><strong>Note</strong>: changing this property will affect all instances of a drawable loaded from a resource. It is recommended to invoke {@link #mutate}() before changing this property.</p> @param {Number} width The width of the shape used by this drawable @param {Number} height The height of the shape used by this drawable @see #mutate() @see #setGradientType(int) */ setSize : function( ) {}, /**<p>Sets the type of shape used to draw the gradient.</p> <p><strong>Note</strong>: changing this property will affect all instances of a drawable loaded from a resource. It is recommended to invoke {@link #mutate}() before changing this property.</p> @param {Number} shape The desired shape for this drawable: {@link #LINE}, {@link #OVAL}, {@link #RECTANGLE} or {@link #RING} @see #mutate() */ setShape : function( ) {}, /**Returns the type of shape used by this drawable, one of {@link #LINE}, {@link #OVAL}, {@link #RECTANGLE} or {@link #RING}. @return {Number} the type of shape used by this drawable @see #setShape(int) */ getShape : function( ) {}, /**Sets the type of gradient used by this drawable. <p> <strong>Note</strong>: changing this property will affect all instances of a drawable loaded from a resource. It is recommended to invoke {@link #mutate}() before changing this property. @param {Number} gradient The type of the gradient: {@link #LINEAR_GRADIENT}, {@link #RADIAL_GRADIENT} or {@link #SWEEP_GRADIENT} @see #mutate() @see #getGradientType() */ setGradientType : function( ) {}, /**Returns the type of gradient used by this drawable, one of {@link #LINEAR_GRADIENT}, {@link #RADIAL_GRADIENT}, or {@link #SWEEP_GRADIENT}. @return {Number} the type of gradient used by this drawable @see #setGradientType(int) */ getGradientType : function( ) {}, /**Sets the position of the center of the gradient as a fraction of the width and height. <p> The default value is (0.5, 0.5). <p> <strong>Note</strong>: changing this property will affect all instances of a drawable loaded from a resource. It is recommended to invoke {@link #mutate}() before changing this property. @param {Number} x the X-position of the center of the gradient @param {Number} y the Y-position of the center of the gradient @see #mutate() @see #setGradientType(int) @see #getGradientCenterX() @see #getGradientCenterY() */ setGradientCenter : function( ) {}, /**Returns the X-position of the center of the gradient as a fraction of the width. @return {Number} the X-position of the center of the gradient @see #setGradientCenter(float, float) */ getGradientCenterX : function( ) {}, /**Returns the Y-position of the center of this gradient as a fraction of the height. @return {Number} the Y-position of the center of the gradient @see #setGradientCenter(float, float) */ getGradientCenterY : function( ) {}, /**Sets the radius of the gradient. The radius is honored only when the gradient type is set to {@link #RADIAL_GRADIENT}. <p> <strong>Note</strong>: changing this property will affect all instances of a drawable loaded from a resource. It is recommended to invoke {@link #mutate}() before changing this property. @param {Number} gradientRadius the radius of the gradient in pixels @see #mutate() @see #setGradientType(int) @see #getGradientRadius() */ setGradientRadius : function( ) {}, /**Returns the radius of the gradient in pixels. The radius is valid only when the gradient type is set to {@link #RADIAL_GRADIENT}. @return {Number} the radius of the gradient in pixels @see #setGradientRadius(float) */ getGradientRadius : function( ) {}, /**Sets whether this drawable's {@code level} property will be used to scale the gradient. If a gradient is not used, this property has no effect. <p> Scaling behavior varies based on gradient type: <ul> <li>{@link #LINEAR_GRADIENT} adjusts the ending position along the gradient's axis of orientation (see {@link #getOrientation}()) <li>{@link #RADIAL_GRADIENT} adjusts the outer radius <li>{@link #SWEEP_GRADIENT} adjusts the ending angle <ul> <p> The default value for this property is {@code false}. <p> <strong>Note</strong>: This property corresponds to the {@code android:useLevel} attribute on the inner {@code <gradient>} tag, NOT the {@code android:useLevel} attribute on the outer {@code <shape>} tag. For example, <pre>{@code <shape ...> <gradient ... android:useLevel="true" /> </shape> }</pre><p> <strong>Note</strong>: Changing this property will affect all instances of a drawable loaded from a resource. It is recommended to invoke {@link #mutate}() before changing this property. @param {Boolean} useLevel {@code true} if the gradient should be scaled based on level, {@code false} otherwise @see #mutate() @see #setLevel(int) @see #getLevel() @see #getUseLevel() @attr ref android.R.styleable#GradientDrawableGradient_useLevel */ setUseLevel : function( ) {}, /**Returns whether this drawable's {@code level} property will be used to scale the gradient. @return {Boolean} {@code true} if the gradient should be scaled based on level, {@code false} otherwise @see #setUseLevel(boolean) @attr ref android.R.styleable#GradientDrawableGradient_useLevel */ getUseLevel : function( ) {}, /**Returns the orientation of the gradient defined in this drawable. @return {Object {android.graphics.drawable.GradientDrawable.Orientation}} the orientation of the gradient defined in this drawable @see #setOrientation(Orientation) */ getOrientation : function( ) {}, /**Sets the orientation of the gradient defined in this drawable. <p> <strong>Note</strong>: changing orientation will affect all instances of a drawable loaded from a resource. It is recommended to invoke {@link #mutate}() before changing the orientation. @param {Object {GradientDrawable.Orientation}} orientation the desired orientation (angle) of the gradient @see #mutate() @see #getOrientation() */ setOrientation : function( ) {}, /**Sets the colors used to draw the gradient. <p> Each color is specified as an ARGB integer and the array must contain at least 2 colors. <p> <strong>Note</strong>: changing colors will affect all instances of a drawable loaded from a resource. It is recommended to invoke {@link #mutate}() before changing the colors. @param {Object {int[]}} colors an array containing 2 or more ARGB colors @see #mutate() @see #setColor(int) */ setColors : function( ) {}, /**Sets the colors and offsets used to draw the gradient. <p> Each color is specified as an ARGB integer and the array must contain at least 2 colors. <p> <strong>Note</strong>: changing colors will affect all instances of a drawable loaded from a resource. It is recommended to invoke {@link #mutate}() before changing the colors. @param {Object {int[]}} colors an array containing 2 or more ARGB colors @param {Object {float[]}} offsets optional array of floating point parameters representing the positions of the colors. Null evenly disperses the colors @see #mutate() @see #setColors(int[]) */ setColors : function( ) {}, /**Returns the colors used to draw the gradient, or {@code null} if the gradient is drawn using a single color or no colors. @return {Number} the colors used to draw the gradient, or {@code null} @see #setColors(int[] colors) */ getColors : function( ) {}, /** */ draw : function( ) {}, /** @param {Object {Xfermode}} mode to draw this drawable with @hide */ setXfermode : function( ) {}, /** @param {Boolean} aa to draw this drawable with @hide */ setAntiAlias : function( ) {}, /**Inner radius of the ring expressed as a ratio of the ring's width. @see #getInnerRadiusRatio() @attr ref android.R.styleable#GradientDrawable_innerRadiusRatio */ setInnerRadiusRatio : function( ) {}, /**Return the inner radius of the ring expressed as a ratio of the ring's width. @see #setInnerRadiusRatio(float) @attr ref android.R.styleable#GradientDrawable_innerRadiusRatio */ getInnerRadiusRatio : function( ) {}, /**Configure the inner radius of the ring. @see #getInnerRadius() @attr ref android.R.styleable#GradientDrawable_innerRadius */ setInnerRadius : function( ) {}, /**Retrn the inner radius of the ring @see #setInnerRadius(int) @attr ref android.R.styleable#GradientDrawable_innerRadius */ getInnerRadius : function( ) {}, /**Configure the thickness of the ring expressed as a ratio of the ring's width. @see #getThicknessRatio() @attr ref android.R.styleable#GradientDrawable_thicknessRatio */ setThicknessRatio : function( ) {}, /**Return the thickness ratio of the ring expressed as a ratio of the ring's width. @see #setThicknessRatio(float) @attr ref android.R.styleable#GradientDrawable_thicknessRatio */ getThicknessRatio : function( ) {}, /**Configure the thickness of the ring. @attr ref android.R.styleable#GradientDrawable_thickness */ setThickness : function( ) {}, /**Return the thickness of the ring @see #setThickness(int) @attr ref android.R.styleable#GradientDrawable_thickness */ getThickness : function( ) {}, /**Configure the padding of the gradient shape @param {Number} left Left padding of the gradient shape @param {Number} top Top padding of the gradient shape @param {Number} right Right padding of the gradient shape @param {Number} bottom Bottom padding of the gradient shape @attr ref android.R.styleable#GradientDrawablePadding_left @attr ref android.R.styleable#GradientDrawablePadding_top @attr ref android.R.styleable#GradientDrawablePadding_right @attr ref android.R.styleable#GradientDrawablePadding_bottom */ setPadding : function( ) {}, /**Changes this drawable to use a single color instead of a gradient. <p> <strong>Note</strong>: changing color will affect all instances of a drawable loaded from a resource. It is recommended to invoke {@link #mutate}() before changing the color. @param {Number} argb The color used to fill the shape @see #mutate() @see #setColors(int[]) @see #getColor */ setColor : function( ) {}, /**Changes this drawable to use a single color state list instead of a gradient. Calling this method with a null argument will clear the color and is equivalent to calling {@link #setColor}(int) with the argument {@link Color#TRANSPARENT}. <p> <strong>Note</strong>: changing color will affect all instances of a drawable loaded from a resource. It is recommended to invoke {@link #mutate}() before changing the color.</p> @param {Object {ColorStateList}} colorStateList The color state list used to fill the shape @see #mutate() @see #getColor */ setColor : function( ) {}, /**Returns the color state list used to fill the shape, or {@code null} if the shape is filled with a gradient or has no fill color. @return {Object {android.content.res.ColorStateList}} the color state list used to fill this gradient, or {@code null} @see #setColor(int) @see #setColor(ColorStateList) */ getColor : function( ) {}, /** */ isStateful : function( ) {}, /** @hide */ hasFocusStateSpecified : function( ) {}, /** */ getChangingConfigurations : function( ) {}, /** */ setAlpha : function( ) {}, /** */ getAlpha : function( ) {}, /** */ setDither : function( ) {}, /** */ getColorFilter : function( ) {}, /** */ setColorFilter : function( ) {}, /** */ setTintList : function( ) {}, /** */ setTintBlendMode : function( ) {}, /** */ getOpacity : function( ) {}, /** */ inflate : function( ) {}, /** */ applyTheme : function( ) {}, /** */ canApplyTheme : function( ) {}, /** */ getIntrinsicWidth : function( ) {}, /** */ getIntrinsicHeight : function( ) {}, /** */ getOpticalInsets : function( ) {}, /** */ getConstantState : function( ) {}, /** */ getOutline : function( ) {}, /** */ mutate : function( ) {}, /** @hide */ clearMutated : function( ) {}, };