BoringLayout.IsBoring 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 |
|---|---|
| IsBoring(String, TextPaint, ITextDirectionHeuristic, Boolean, BoringLayout+Metrics) |
Measures text when it can use the simple single-line layout. |
| IsBoring(ICharSequence, TextPaint, ITextDirectionHeuristic, Boolean, BoringLayout+Metrics) |
Returns null if not boring; the width, ascent, and descent in the provided Metrics object (or a new one if the provided one was null) if boring. |
| IsBoring(String, TextPaint, BoringLayout+Metrics) |
Determine and compute metrics if given text can be handled by BoringLayout. |
| IsBoring(String, TextPaint) |
Determine and compute metrics if given text can be handled by BoringLayout. |
| IsBoring(ICharSequence, TextPaint) |
Determine and compute metrics if given text can be handled by BoringLayout. |
| IsBoring(ICharSequence, TextPaint, BoringLayout+Metrics) |
Determine and compute metrics if given text can be handled by BoringLayout. |
IsBoring(String, TextPaint, ITextDirectionHeuristic, Boolean, BoringLayout+Metrics)
Measures text when it can use the simple single-line layout.
public static Android.Text.BoringLayout.Metrics? IsBoring(string text, Android.Text.TextPaint paint, Android.Text.ITextDirectionHeuristic textDir, bool useFallbackLineSpacing, Android.Text.BoringLayout.Metrics? metrics);
static member IsBoring : string * Android.Text.TextPaint * Android.Text.ITextDirectionHeuristic * bool * Android.Text.BoringLayout.Metrics -> Android.Text.BoringLayout.Metrics
Parameters
- text
- String
The text to check and measure.
- paint
- TextPaint
The paint that supplies text measurement settings.
- textDir
- ITextDirectionHeuristic
The heuristic used to reject text whose overall direction is right-to-left.
- useFallbackLineSpacing
- Boolean
Whether fallback-font metrics can increase the measured line height.
- metrics
- BoringLayout.Metrics
An optional metrics object to reset and fill after the text passes the checks.
Returns
The measured font metrics and width, or null if the text requires a more general layout.
Remarks
A supplied metrics object is reset and filled only after the text passes the single-line and direction checks.
Applies to
IsBoring(ICharSequence, TextPaint, ITextDirectionHeuristic, Boolean, BoringLayout+Metrics)
Returns null if not boring; the width, ascent, and descent in the provided Metrics object (or a new one if the provided one was null) if boring.
[Android.Runtime.Register("isBoring", "(Ljava/lang/CharSequence;Landroid/text/TextPaint;Landroid/text/TextDirectionHeuristic;ZLandroid/text/BoringLayout$Metrics;)Landroid/text/BoringLayout$Metrics;", "", ApiSince=33)]
public static Android.Text.BoringLayout.Metrics? IsBoring(Java.Lang.ICharSequence text, Android.Text.TextPaint paint, Android.Text.ITextDirectionHeuristic textDir, bool useFallbackLineSpacing, Android.Text.BoringLayout.Metrics? metrics);
[<Android.Runtime.Register("isBoring", "(Ljava/lang/CharSequence;Landroid/text/TextPaint;Landroid/text/TextDirectionHeuristic;ZLandroid/text/BoringLayout$Metrics;)Landroid/text/BoringLayout$Metrics;", "", ApiSince=33)>]
static member IsBoring : Java.Lang.ICharSequence * Android.Text.TextPaint * Android.Text.ITextDirectionHeuristic * bool * Android.Text.BoringLayout.Metrics -> Android.Text.BoringLayout.Metrics
Parameters
- text
- ICharSequence
a text to be calculated text layout. This value cannot be null.
- paint
- TextPaint
a paint object used for styling. This value cannot be null.
- textDir
- ITextDirectionHeuristic
a text direction. This value cannot be null.
- useFallbackLineSpacing
- Boolean
True for adjusting the line spacing based on fallback fonts. False for keeping the first font's line height. If some glyphs requires larger vertical spaces, by passing true to this argument, the layout increase the line height to fit all glyphs.
- metrics
- BoringLayout.Metrics
the out metrics. This value may be null.
Returns
metrics on success. null if text cannot be rendered by BoringLayout.
- Attributes
Remarks
Returns null if not boring; the width, ascent, and descent in the provided Metrics object (or a new one if the provided one was null) if boring.
Android reference for android.text.BoringLayout.isBoring.
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
IsBoring(String, TextPaint, BoringLayout+Metrics)
Determine and compute metrics if given text can be handled by BoringLayout.
public static Android.Text.BoringLayout.Metrics? IsBoring(string? text, Android.Text.TextPaint? paint, Android.Text.BoringLayout.Metrics? metrics);
static member IsBoring : string * Android.Text.TextPaint * Android.Text.BoringLayout.Metrics -> Android.Text.BoringLayout.Metrics
Parameters
- text
- String
a text
- paint
- TextPaint
a paint
- metrics
- BoringLayout.Metrics
An optional metrics object to reset and fill when the text can use this layout.
Returns
layout metric for the given text. null if given text is unable to be handled by BoringLayout.
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
IsBoring(String, TextPaint)
Determine and compute metrics if given text can be handled by BoringLayout.
public static Android.Text.BoringLayout.Metrics? IsBoring(string? text, Android.Text.TextPaint? paint);
static member IsBoring : string * Android.Text.TextPaint -> Android.Text.BoringLayout.Metrics
Parameters
- text
- String
a text
- paint
- TextPaint
a paint
Returns
layout metric for the given text. null if given text is unable to be handled by BoringLayout.
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
IsBoring(ICharSequence, TextPaint)
Determine and compute metrics if given text can be handled by BoringLayout.
[Android.Runtime.Register("isBoring", "(Ljava/lang/CharSequence;Landroid/text/TextPaint;)Landroid/text/BoringLayout$Metrics;", "")]
public static Android.Text.BoringLayout.Metrics? IsBoring(Java.Lang.ICharSequence? text, Android.Text.TextPaint? paint);
[<Android.Runtime.Register("isBoring", "(Ljava/lang/CharSequence;Landroid/text/TextPaint;)Landroid/text/BoringLayout$Metrics;", "")>]
static member IsBoring : Java.Lang.ICharSequence * Android.Text.TextPaint -> Android.Text.BoringLayout.Metrics
Parameters
- text
- ICharSequence
a text
- paint
- TextPaint
a paint
Returns
layout metric for the given text. null if given text is unable to be handled by BoringLayout.
- Attributes
Remarks
Determine and compute metrics if given text can be handled by BoringLayout.
Android reference for android.text.BoringLayout.isBoring.
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
IsBoring(ICharSequence, TextPaint, BoringLayout+Metrics)
Determine and compute metrics if given text can be handled by BoringLayout.
[Android.Runtime.Register("isBoring", "(Ljava/lang/CharSequence;Landroid/text/TextPaint;Landroid/text/BoringLayout$Metrics;)Landroid/text/BoringLayout$Metrics;", "")]
public static Android.Text.BoringLayout.Metrics? IsBoring(Java.Lang.ICharSequence? text, Android.Text.TextPaint? paint, Android.Text.BoringLayout.Metrics? metrics);
[<Android.Runtime.Register("isBoring", "(Ljava/lang/CharSequence;Landroid/text/TextPaint;Landroid/text/BoringLayout$Metrics;)Landroid/text/BoringLayout$Metrics;", "")>]
static member IsBoring : Java.Lang.ICharSequence * Android.Text.TextPaint * Android.Text.BoringLayout.Metrics -> Android.Text.BoringLayout.Metrics
Parameters
- text
- ICharSequence
a text
- paint
- TextPaint
a paint
- metrics
- BoringLayout.Metrics
a metrics object to be recycled. If null is passed, this function creat new object.
Returns
layout metric for the given text. null if given text is unable to be handled by BoringLayout.
- Attributes
Remarks
Determine and compute metrics if given text can be handled by BoringLayout.
Android reference for android.text.BoringLayout.isBoring.
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.