Share via


Layout Constructors

Definition

Overloads

Layout(IntPtr, JniHandleOwnership)

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

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

Subclasses of Layout use this constructor to set the display text, width, and other standard properties.

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

Subclasses of Layout use this constructor to set the display text, width, and other standard properties.

Layout(IntPtr, JniHandleOwnership)

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

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

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

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

Subclasses of Layout use this constructor to set the display text, width, and other standard properties.

[Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;Landroid/text/TextPaint;ILandroid/text/Layout$Alignment;FF)V", "")]
protected Layout (Java.Lang.ICharSequence? text, Android.Text.TextPaint? paint, int width, Android.Text.Layout.Alignment? align, float spacingMult, float spacingAdd);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;Landroid/text/TextPaint;ILandroid/text/Layout$Alignment;FF)V", "")>]
new Android.Text.Layout : Java.Lang.ICharSequence * Android.Text.TextPaint * int * Android.Text.Layout.Alignment * single * single -> Android.Text.Layout

Parameters

text
ICharSequence

the text to render

paint
TextPaint

the default paint for the layout. Styles can override various attributes of the paint.

width
Int32

the wrapping width for the text.

align
Layout.Alignment

whether to left, right, or center the text. Styles can override the alignment.

spacingMult
Single

factor by which to scale the font size to get the default line spacing

spacingAdd
Single

amount to add to the default line spacing

Attributes

Remarks

Java documentation for android.text.Layout.Layout(java.lang.CharSequence, android.text.TextPaint, int, android.text.Alignment, float, float).

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

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

Subclasses of Layout use this constructor to set the display text, width, and other standard properties.

[Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;Landroid/text/TextPaint;ILandroid/text/Layout$Alignment;FF)V", "")]
protected Layout (string? text, Android.Text.TextPaint? paint, int width, Android.Text.Layout.Alignment? align, float spacingMult, float spacingAdd);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/CharSequence;Landroid/text/TextPaint;ILandroid/text/Layout$Alignment;FF)V", "")>]
new Android.Text.Layout : string * Android.Text.TextPaint * int * Android.Text.Layout.Alignment * single * single -> Android.Text.Layout

Parameters

text
String
paint
TextPaint
width
Int32
spacingMult
Single
spacingAdd
Single
Attributes

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