Udostępnij za pośrednictwem


Layout.GetDesiredWidth Method

Definition

Overloads

GetDesiredWidth(String, Int32, Int32, TextPaint)

Return how wide a layout must be in order to display the specified text slice with one line per paragraph.

GetDesiredWidth(ICharSequence, Int32, Int32, TextPaint)

Return how wide a layout must be in order to display the specified text slice with one line per paragraph.

GetDesiredWidth(String, TextPaint)

Return how wide a layout must be in order to display the specified text with one line per paragraph.

GetDesiredWidth(ICharSequence, TextPaint)

Return how wide a layout must be in order to display the specified text with one line per paragraph.

GetDesiredWidth(String, Int32, Int32, TextPaint)

Return how wide a layout must be in order to display the specified text slice with one line per paragraph.

public static float GetDesiredWidth (string? source, int start, int end, Android.Text.TextPaint? paint);
static member GetDesiredWidth : string * int * int * Android.Text.TextPaint -> single

Parameters

source
String
start
Int32
end
Int32
paint
TextPaint

Returns

Remarks

Return how wide a layout must be in order to display the specified text slice with one line per paragraph.

As of O, Uses TextDirectionHeuristics#FIRSTSTRONG_LTR as the default text direction heuristics. In the earlier versions uses TextDirectionHeuristics#LTR as the default.

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

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

GetDesiredWidth(ICharSequence, Int32, Int32, TextPaint)

Return how wide a layout must be in order to display the specified text slice with one line per paragraph.

[Android.Runtime.Register("getDesiredWidth", "(Ljava/lang/CharSequence;IILandroid/text/TextPaint;)F", "")]
public static float GetDesiredWidth (Java.Lang.ICharSequence? source, int start, int end, Android.Text.TextPaint? paint);
[<Android.Runtime.Register("getDesiredWidth", "(Ljava/lang/CharSequence;IILandroid/text/TextPaint;)F", "")>]
static member GetDesiredWidth : Java.Lang.ICharSequence * int * int * Android.Text.TextPaint -> single

Parameters

source
ICharSequence
start
Int32
end
Int32
paint
TextPaint

Returns

Attributes

Remarks

Return how wide a layout must be in order to display the specified text slice with one line per paragraph.

As of O, Uses TextDirectionHeuristics#FIRSTSTRONG_LTR as the default text direction heuristics. In the earlier versions uses TextDirectionHeuristics#LTR as the default.

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

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

GetDesiredWidth(String, TextPaint)

Return how wide a layout must be in order to display the specified text with one line per paragraph.

public static float GetDesiredWidth (string? source, Android.Text.TextPaint? paint);
static member GetDesiredWidth : string * Android.Text.TextPaint -> single

Parameters

source
String
paint
TextPaint

Returns

Remarks

Return how wide a layout must be in order to display the specified text with one line per paragraph.

As of O, Uses TextDirectionHeuristics#FIRSTSTRONG_LTR as the default text direction heuristics. In the earlier versions uses TextDirectionHeuristics#LTR as the default.

Java documentation for android.text.Layout.getDesiredWidth(java.lang.CharSequence, android.text.TextPaint).

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

GetDesiredWidth(ICharSequence, TextPaint)

Return how wide a layout must be in order to display the specified text with one line per paragraph.

[Android.Runtime.Register("getDesiredWidth", "(Ljava/lang/CharSequence;Landroid/text/TextPaint;)F", "")]
public static float GetDesiredWidth (Java.Lang.ICharSequence? source, Android.Text.TextPaint? paint);
[<Android.Runtime.Register("getDesiredWidth", "(Ljava/lang/CharSequence;Landroid/text/TextPaint;)F", "")>]
static member GetDesiredWidth : Java.Lang.ICharSequence * Android.Text.TextPaint -> single

Parameters

source
ICharSequence
paint
TextPaint

Returns

Attributes

Remarks

Return how wide a layout must be in order to display the specified text with one line per paragraph.

As of O, Uses TextDirectionHeuristics#FIRSTSTRONG_LTR as the default text direction heuristics. In the earlier versions uses TextDirectionHeuristics#LTR as the default.

Java documentation for android.text.Layout.getDesiredWidth(java.lang.CharSequence, android.text.TextPaint).

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