Android.Graphics.Drawables.GradientDrawable.SetStroke Method

Syntax

[Android.Runtime.Register("setStroke", "(ILandroid/content/res/ColorStateList;FF)V", "GetSetStroke_ILandroid_content_res_ColorStateList_FFHandler")]
public virtual void SetStroke (int width, Android.Content.Res.ColorStateList colorStateList, float dashWidth, float dashGap)

See Also

GradientDrawable.SetStroke(int, Android.Content.Res.ColorStateList)

Parameters

width
The width in pixels of the stroke
colorStateList
The color state list of the stroke
dashWidth
The length in pixels of the dashes, set to 0 to disable dashes
dashGap
The gap in pixels between dashes

Remarks

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.

Note: changing this property will affect all instances of a drawable loaded from a resource. It is recommended to invoke GradientDrawable.mutate() before changing this property.

[Android Documentation]

Requirements

Namespace: Android.Graphics.Drawables
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1