Language

StaticLayout Constructors

Definition

Overloads

Name Description
StaticLayout(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

StaticLayout(ICharSequence, TextPaint, Int32, Layout+Alignment, Single, Single, Boolean)

Used by DynamicLayout.

StaticLayout(String, TextPaint, Int32, Layout+Alignment, Single, Single, Boolean)

Creates a fixed layout for the supplied text and line-spacing settings.

StaticLayout(ICharSequence, Int32, Int32, TextPaint, Int32, Layout+Alignment, Single, Single, Boolean)

Used by DynamicLayout.

StaticLayout(String, Int32, Int32, TextPaint, Int32, Layout+Alignment, Single, Single, Boolean)

Creates a fixed layout for the selected text range.

StaticLayout(ICharSequence, Int32, Int32, TextPaint, Int32, Layout+Alignment, Single, Single, Boolean, TextUtils+TruncateAt, Int32)

Used by DynamicLayout.

StaticLayout(String, Int32, Int32, TextPaint, Int32, Layout+Alignment, Single, Single, Boolean, TextUtils+TruncateAt, Int32)

Creates a fixed text-range layout with optional ellipsis processing.

StaticLayout(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected StaticLayout(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Text.StaticLayout : nativeint * Android.Runtime.JniHandleOwnership -> Android.Text.StaticLayout

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

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.

Applies to

StaticLayout(ICharSequence, TextPaint, Int32, Layout+Alignment, Single, Single, Boolean)

Used by DynamicLayout.

[Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;Landroid/text/TextPaint;ILandroid/text/Layout$Alignment;FFZ)V", "")]
public StaticLayout(Java.Lang.ICharSequence? source, Android.Text.TextPaint? paint, int width, Android.Text.Layout.Alignment? align, float spacingmult, float spacingadd, bool includepad);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;Landroid/text/TextPaint;ILandroid/text/Layout$Alignment;FFZ)V", "")>]
new Android.Text.StaticLayout : Java.Lang.ICharSequence * Android.Text.TextPaint * int * Android.Text.Layout.Alignment * single * single * bool -> Android.Text.StaticLayout

Parameters

source
ICharSequence

The text to lay out.

paint
TextPaint

The paint used to measure and draw the text.

width
Int32

The layout width in pixels.

align
Layout.Alignment

The paragraph alignment within the layout.

spacingmult
Single

The multiplier used when calculating interline spacing.

spacingadd
Single

The extra pixels added when calculating interline spacing.

includepad
Boolean

Whether to reserve extra top and bottom font padding to reduce glyph clipping.

Attributes

Remarks

This constructor is deprecated. Use Builder instead.

Android reference for android.text.StaticLayout.StaticLayout.

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

StaticLayout(String, TextPaint, Int32, Layout+Alignment, Single, Single, Boolean)

Creates a fixed layout for the supplied text and line-spacing settings.

[Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;Landroid/text/TextPaint;ILandroid/text/Layout$Alignment;FFZ)V", "")]
public StaticLayout(string? source, Android.Text.TextPaint? paint, int width, Android.Text.Layout.Alignment? align, float spacingmult, float spacingadd, bool includepad);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;Landroid/text/TextPaint;ILandroid/text/Layout$Alignment;FFZ)V", "")>]
new Android.Text.StaticLayout : string * Android.Text.TextPaint * int * Android.Text.Layout.Alignment * single * single * bool -> Android.Text.StaticLayout

Parameters

source
String

The text to lay out.

paint
TextPaint

The paint used to measure and draw the text.

width
Int32

The layout width in pixels.

align
Layout.Alignment

The paragraph alignment within the layout.

spacingmult
Single

The multiplier used when calculating interline spacing.

spacingadd
Single

The extra pixels added when calculating interline spacing.

includepad
Boolean

Whether to reserve extra top and bottom font padding to reduce glyph clipping.

Attributes

Remarks

This constructor is deprecated. Use Builder instead.

Android reference for android.text.StaticLayout.StaticLayout.

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

StaticLayout(ICharSequence, Int32, Int32, TextPaint, Int32, Layout+Alignment, Single, Single, Boolean)

Used by DynamicLayout.

[Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;IILandroid/text/TextPaint;ILandroid/text/Layout$Alignment;FFZ)V", "")]
public StaticLayout(Java.Lang.ICharSequence? source, int bufstart, int bufend, Android.Text.TextPaint? paint, int outerwidth, Android.Text.Layout.Alignment? align, float spacingmult, float spacingadd, bool includepad);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;IILandroid/text/TextPaint;ILandroid/text/Layout$Alignment;FFZ)V", "")>]
new Android.Text.StaticLayout : Java.Lang.ICharSequence * int * int * Android.Text.TextPaint * int * Android.Text.Layout.Alignment * single * single * bool -> Android.Text.StaticLayout

Parameters

source
ICharSequence

The text that contains the range to lay out.

bufstart
Int32

The first character index to include.

bufend
Int32

The character index at which the range stops, excluding that character.

paint
TextPaint

The paint used to measure and draw the text.

outerwidth
Int32

The layout width in pixels.

align
Layout.Alignment

The paragraph alignment within the layout.

spacingmult
Single

The multiplier used when calculating interline spacing.

spacingadd
Single

The extra pixels added when calculating interline spacing.

includepad
Boolean

Whether to reserve extra top and bottom font padding to reduce glyph clipping.

Attributes

Remarks

This constructor is deprecated. Use Builder instead.

Android reference for android.text.StaticLayout.StaticLayout.

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

StaticLayout(String, Int32, Int32, TextPaint, Int32, Layout+Alignment, Single, Single, Boolean)

Creates a fixed layout for the selected text range.

[Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;IILandroid/text/TextPaint;ILandroid/text/Layout$Alignment;FFZ)V", "")]
public StaticLayout(string? source, int bufstart, int bufend, Android.Text.TextPaint? paint, int outerwidth, Android.Text.Layout.Alignment? align, float spacingmult, float spacingadd, bool includepad);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;IILandroid/text/TextPaint;ILandroid/text/Layout$Alignment;FFZ)V", "")>]
new Android.Text.StaticLayout : string * int * int * Android.Text.TextPaint * int * Android.Text.Layout.Alignment * single * single * bool -> Android.Text.StaticLayout

Parameters

source
String

The text that contains the range to lay out.

bufstart
Int32

The first character index to include.

bufend
Int32

The character index at which the range stops, excluding that character.

paint
TextPaint

The paint used to measure and draw the text.

outerwidth
Int32

The layout width in pixels.

align
Layout.Alignment

The paragraph alignment within the layout.

spacingmult
Single

The multiplier used when calculating interline spacing.

spacingadd
Single

The extra pixels added when calculating interline spacing.

includepad
Boolean

Whether to reserve extra top and bottom font padding to reduce glyph clipping.

Attributes

Remarks

This constructor is deprecated. Use Builder instead.

Android reference for android.text.StaticLayout.StaticLayout.

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

StaticLayout(ICharSequence, Int32, Int32, TextPaint, Int32, Layout+Alignment, Single, Single, Boolean, TextUtils+TruncateAt, Int32)

Used by DynamicLayout.

[Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;IILandroid/text/TextPaint;ILandroid/text/Layout$Alignment;FFZLandroid/text/TextUtils$TruncateAt;I)V", "")]
public StaticLayout(Java.Lang.ICharSequence? source, int bufstart, int bufend, Android.Text.TextPaint? paint, int outerwidth, Android.Text.Layout.Alignment? align, float spacingmult, float spacingadd, bool includepad, Android.Text.TextUtils.TruncateAt? ellipsize, int ellipsizedWidth);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;IILandroid/text/TextPaint;ILandroid/text/Layout$Alignment;FFZLandroid/text/TextUtils$TruncateAt;I)V", "")>]
new Android.Text.StaticLayout : Java.Lang.ICharSequence * int * int * Android.Text.TextPaint * int * Android.Text.Layout.Alignment * single * single * bool * Android.Text.TextUtils.TruncateAt * int -> Android.Text.StaticLayout

Parameters

source
ICharSequence

The text that contains the range to lay out.

bufstart
Int32

The first character index to include.

bufend
Int32

The character index at which the range stops, excluding that character.

paint
TextPaint

The paint used to measure and draw the text.

outerwidth
Int32

The layout width in pixels.

align
Layout.Alignment

The paragraph alignment within the layout.

spacingmult
Single

The multiplier used when calculating interline spacing.

spacingadd
Single

The extra pixels added when calculating interline spacing.

includepad
Boolean

Whether to reserve extra top and bottom font padding to reduce glyph clipping.

ellipsize
TextUtils.TruncateAt

The requested ellipsis mode, or null to disable ellipsis.

ellipsizedWidth
Int32

The pixel width used when applying ellipsis.

Attributes

Remarks

This constructor is deprecated. Use Builder instead.

Android reference for android.text.StaticLayout.StaticLayout.

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

StaticLayout(String, Int32, Int32, TextPaint, Int32, Layout+Alignment, Single, Single, Boolean, TextUtils+TruncateAt, Int32)

Creates a fixed text-range layout with optional ellipsis processing.

[Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;IILandroid/text/TextPaint;ILandroid/text/Layout$Alignment;FFZLandroid/text/TextUtils$TruncateAt;I)V", "")]
public StaticLayout(string? source, int bufstart, int bufend, Android.Text.TextPaint? paint, int outerwidth, Android.Text.Layout.Alignment? align, float spacingmult, float spacingadd, bool includepad, Android.Text.TextUtils.TruncateAt? ellipsize, int ellipsizedWidth);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;IILandroid/text/TextPaint;ILandroid/text/Layout$Alignment;FFZLandroid/text/TextUtils$TruncateAt;I)V", "")>]
new Android.Text.StaticLayout : string * int * int * Android.Text.TextPaint * int * Android.Text.Layout.Alignment * single * single * bool * Android.Text.TextUtils.TruncateAt * int -> Android.Text.StaticLayout

Parameters

source
String

The text that contains the range to lay out.

bufstart
Int32

The first character index to include.

bufend
Int32

The character index at which the range stops, excluding that character.

paint
TextPaint

The paint used to measure and draw the text.

outerwidth
Int32

The layout width in pixels.

align
Layout.Alignment

The paragraph alignment within the layout.

spacingmult
Single

The multiplier used when calculating interline spacing.

spacingadd
Single

The extra pixels added when calculating interline spacing.

includepad
Boolean

Whether to reserve extra top and bottom font padding to reduce glyph clipping.

ellipsize
TextUtils.TruncateAt

The requested ellipsis mode, or null to disable ellipsis.

ellipsizedWidth
Int32

The pixel width used when applying ellipsis.

Attributes

Remarks

This constructor is deprecated. Use Builder instead.

Android reference for android.text.StaticLayout.StaticLayout.

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