StaticLayout.Builder.Obtain Method
Definition
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.
Overloads
| Name | Description |
|---|---|
| Obtain(ICharSequence, Int32, Int32, TextPaint, Int32) |
Obtain a builder for constructing StaticLayout objects. |
| Obtain(String, Int32, Int32, TextPaint, Int32) |
Obtains a builder for a fixed layout of a string range. |
Obtain(ICharSequence, Int32, Int32, TextPaint, Int32)
Obtain a builder for constructing StaticLayout objects.
[Android.Runtime.Register("obtain", "(Ljava/lang/CharSequence;IILandroid/text/TextPaint;I)Landroid/text/StaticLayout$Builder;", "", ApiSince=23)]
public static Android.Text.StaticLayout.Builder Obtain(Java.Lang.ICharSequence source, int start, int end, Android.Text.TextPaint paint, int width);
[<Android.Runtime.Register("obtain", "(Ljava/lang/CharSequence;IILandroid/text/TextPaint;I)Landroid/text/StaticLayout$Builder;", "", ApiSince=23)>]
static member Obtain : Java.Lang.ICharSequence * int * int * Android.Text.TextPaint * int -> Android.Text.StaticLayout.Builder
Parameters
- source
- ICharSequence
The text to be laid out, optionally with spans. This value cannot be null.
- start
- Int32
The index of the start of the text. Value is 0 or greater
- end
- Int32
The index + 1 of the end of the text. Value is 0 or greater
- paint
- TextPaint
The base paint used for layout. This value cannot be null.
- width
- Int32
The width in pixels. Value is 0 or greater
Returns
a builder object used for constructing the StaticLayout. This value cannot be null.
- Attributes
Remarks
Obtain a builder for constructing StaticLayout objects.
Android reference for android.text.StaticLayout.Builder.obtain.
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
Obtain(String, Int32, Int32, TextPaint, Int32)
Obtains a builder for a fixed layout of a string range.
public static Android.Text.StaticLayout.Builder Obtain(string source, int start, int end, Android.Text.TextPaint paint, int width);
static member Obtain : string * int * int * Android.Text.TextPaint * int -> Android.Text.StaticLayout.Builder
Parameters
- source
- String
The string that contains the range to lay out.
- start
- Int32
The first character index to include.
- end
- Int32
The character index at which the range stops, excluding that character.
- paint
- TextPaint
The paint used to measure and draw the text.
- width
- Int32
The layout width in pixels.
Returns
A builder initialized for the specified text range and width.
Remarks
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.