Język

DynamicDrawableSpan.GetSize Method

Definition

[Android.Runtime.Register("getSize", "(Landroid/graphics/Paint;Ljava/lang/CharSequence;IILandroid/graphics/Paint$FontMetricsInt;)I", "GetGetSize_Landroid_graphics_Paint_Ljava_lang_CharSequence_IILandroid_graphics_Paint_FontMetricsInt_Handler")]
public override int GetSize(Android.Graphics.Paint paint, Java.Lang.ICharSequence? text, int start, int end, Android.Graphics.Paint.FontMetricsInt? fm);
[<Android.Runtime.Register("getSize", "(Landroid/graphics/Paint;Ljava/lang/CharSequence;IILandroid/graphics/Paint$FontMetricsInt;)I", "GetGetSize_Landroid_graphics_Paint_Ljava_lang_CharSequence_IILandroid_graphics_Paint_FontMetricsInt_Handler")>]
override this.GetSize : Android.Graphics.Paint * Java.Lang.ICharSequence * int * int * Android.Graphics.Paint.FontMetricsInt -> int

Parameters

paint
Paint
text
ICharSequence

Current text.

start
Int32

Value is 0 or greater

end
Int32

Value is 0 or greater

Returns

Width of the span.

Attributes

Remarks

Returns the width of the span. Extending classes can set the height of the span by updating attributes of Paint.FontMetricsInt. If the span covers the whole text, and the height is not set, draw(Canvas,CharSequence,int,int,float,int,int,int,Paint) will not be called for the span.

Android reference for android.text.style.DynamicDrawableSpan.getSize.

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.

Applies to