Compartir a través de


BoringLayout Class

Definition

A BoringLayout is a very simple Layout implementation for text that fits on a single line and is all left-to-right characters.

[Android.Runtime.Register("android/text/BoringLayout", DoNotGenerateAcw=true)]
public class BoringLayout : Android.Text.Layout, Android.Text.TextUtils.IEllipsizeCallback, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/text/BoringLayout", DoNotGenerateAcw=true)>]
type BoringLayout = class
    inherit Layout
    interface TextUtils.IEllipsizeCallback
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
BoringLayout
Attributes
Implements

Remarks

A BoringLayout is a very simple Layout implementation for text that fits on a single line and is all left-to-right characters. You will probably never want to make one of these yourself; if you do, be sure to call #isBoring first to make sure the text meets the criteria.

This class is used by widgets to control text layout. You should not need to use this class directly unless you are implementing your own widget or custom display object, in which case you are encouraged to use a Layout instead of calling android.graphics.Canvas#drawText(java.lang.CharSequence, int, int, float, float, android.graphics.Paint) Canvas.drawText() directly.

Java documentation for android.text.BoringLayout.

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.

Constructors

BoringLayout(ICharSequence, TextPaint, Int32, Layout+Alignment, Single, Single, BoringLayout+Metrics, Boolean)
BoringLayout(ICharSequence, TextPaint, Int32, Layout+Alignment, Single, Single, BoringLayout+Metrics, Boolean, TextUtils+TruncateAt, Int32)
BoringLayout(ICharSequence, TextPaint, Int32, Layout+Alignment, Single, Single, BoringLayout+Metrics, Boolean, TextUtils+TruncateAt, Int32, Boolean)
BoringLayout(IntPtr, JniHandleOwnership)

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

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

Fields

DefaultLinespacingAddition (Inherited from Layout)
DefaultLinespacingMultiplier (Inherited from Layout)
HyphenationFrequencyFullFast
Obsolete.

Value for hyphenation frequency indicating the full amount of automatic hyphenation with using faster algorithm.

(Inherited from Layout)
HyphenationFrequencyNormalFast
Obsolete.

Value for hyphenation frequency indicating a light amount of automatic hyphenation with using faster algorithm.

(Inherited from Layout)

Properties

BottomPadding

Returns the number of extra pixels of descent padding in the bottom line of the Layout.

Class

Returns the runtime class of this Object.

(Inherited from Object)
EllipsizedWidth

Return the width to which this Layout is ellipsizing, or #getWidth if it is not doing anything special.

(Inherited from Layout)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
Height

Return the total height of this layout.

(Inherited from Layout)
IsFallbackLineSpacingEnabled

Return true if the fallback line space is enabled in this Layout.

(Inherited from Layout)
IsSpanned (Inherited from Layout)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
LineCount

Return the number of lines of text in this layout.

Paint

Return the base Paint properties for this layout.

(Inherited from Layout)
PeerReference (Inherited from Object)
SpacingAdd

Return the number of units of leading that are added to each line.

(Inherited from Layout)
SpacingMultiplier

Return what the text height is multiplied by to get the line height.

(Inherited from Layout)
Text (Inherited from Layout)
TextFormatted

Return the text that is displayed by this Layout.

(Inherited from Layout)
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

TopPadding

Returns the (negative) number of extra pixels of ascent padding in the top line of the Layout.

Width

Return the width of this layout.

(Inherited from Layout)

Methods

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Draw(Canvas)

Draw this Layout on the specified Canvas.

(Inherited from Layout)
Draw(Canvas, IList<Path>, IList<Paint>, Path, Paint, Int32)

Draw this layout on the specified canvas.

(Inherited from Layout)
Draw(Canvas, Path, Paint, Int32)

Draw this Layout on the specified canvas, with the highlight path drawn between the background and the text.

(Inherited from Layout)
DrawBackground(Canvas)

Draw background of this layout.

(Inherited from Layout)
DrawText(Canvas)

Draw text part of this layout.

(Inherited from Layout)
Ellipsized(Int32, Int32)

Callback for the ellipsizer to report what region it ellipsized.

Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
FillCharacterBounds(Int32, Int32, Single[], Int32)

Return the characters' bounds in the given range.

(Inherited from Layout)
GetAlignment()

Return the base alignment of this layout.

(Inherited from Layout)
GetCursorPath(Int32, Path, ICharSequence)

Fills in the specified Path with a representation of a cursor at the specified offset.

(Inherited from Layout)
GetCursorPath(Int32, Path, String)

Fills in the specified Path with a representation of a cursor at the specified offset.

(Inherited from Layout)
GetEllipsisCount(Int32)

Returns the number of characters to be ellipsized away, or 0 if no ellipsis is to take place.

GetEllipsisStart(Int32)

Return the offset of the first character to be ellipsized away, relative to the start of the line.

GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetLineAscent(Int32)

Get the ascent of the text on the specified line.

(Inherited from Layout)
GetLineBaseline(Int32)

Return the vertical position of the baseline of the specified line.

(Inherited from Layout)
GetLineBottom(Int32)

Return the vertical position of the bottom of the specified line.

(Inherited from Layout)
GetLineBottom(Int32, Boolean)

Return the vertical position of the bottom of the specified line.

(Inherited from Layout)
GetLineBounds(Int32, Rect)

Return the baseline for the specified line (0&hellip;getLineCount() - 1) If bounds is not null, return the top, left, right, bottom extents of the specified line in it.

(Inherited from Layout)
GetLineContainsTab(Int32)

Returns whether the specified line contains one or more characters that need to be handled specially, like tabs or emoji.

GetLineDescent(Int32)

Return the descent of the specified line(0&hellip;getLineCount() - 1).

GetLineDirections(Int32)

Returns the directional run information for the specified line.

GetLineEnd(Int32)

Return the text offset after the last character on the specified line.

(Inherited from Layout)
GetLineForOffset(Int32)

Get the line number on which the specified text offset appears.

(Inherited from Layout)
GetLineForVertical(Int32)

Get the line number corresponding to the specified vertical position.

(Inherited from Layout)
GetLineLeft(Int32)

Get the leftmost position that should be exposed for horizontal scrolling on the specified line.

(Inherited from Layout)
GetLineMax(Int32)

Gets the unsigned horizontal extent of the specified line, including leading margin indent, but excluding trailing whitespace.

(Inherited from Layout)
GetLineRight(Int32)

Get the rightmost position that should be exposed for horizontal scrolling on the specified line.

(Inherited from Layout)
GetLineStart(Int32)

Return the text offset of the beginning of the specified line ( 0&hellip;getLineCount()).

GetLineTop(Int32)

Return the vertical position of the top of the specified line (0&hellip;getLineCount()).

GetLineVisibleEnd(Int32)

Return the text offset after the last visible character (so whitespace is not counted) on the specified line.

(Inherited from Layout)
GetLineWidth(Int32)

Gets the unsigned horizontal extent of the specified line, including leading margin indent and trailing whitespace.

(Inherited from Layout)
GetOffsetForHorizontal(Int32, Single)

Get the character offset on the specified line whose position is closest to the specified horizontal position.

(Inherited from Layout)
GetOffsetToLeftOf(Int32) (Inherited from Layout)
GetOffsetToRightOf(Int32) (Inherited from Layout)
GetParagraphAlignment(Int32)

Get the alignment of the specified paragraph, taking into account markup attached to it.

(Inherited from Layout)
GetParagraphDirection(Int32)
GetParagraphLeft(Int32)

Get the left edge of the specified paragraph, inset by left margins.

(Inherited from Layout)
GetParagraphRight(Int32)

Get the right edge of the specified paragraph, inset by right margins.

(Inherited from Layout)
GetPrimaryHorizontal(Int32)

Get the primary horizontal position for the specified text offset.

(Inherited from Layout)
GetRangeForRect(RectF, SegmentFinder, Layout+ITextInclusionStrategy) (Inherited from Layout)
GetSecondaryHorizontal(Int32)

Get the secondary horizontal position for the specified text offset.

(Inherited from Layout)
GetSelectionPath(Int32, Int32, Path)

Fills in the specified Path with a representation of a highlight between the specified offsets.

(Inherited from Layout)
IncreaseWidthTo(Int32)

Increase the width of this layout to the specified width.

(Inherited from Layout)
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(ICharSequence, TextPaint, ITextDirectionHeuristic, Boolean, BoringLayout+Metrics)
IsBoring(String, TextPaint)

Determine and compute metrics if given text can be handled by BoringLayout.

IsBoring(String, TextPaint, BoringLayout+Metrics)

Determine and compute metrics if given text can be handled by BoringLayout.

IsBoring(String, TextPaint, ITextDirectionHeuristic, Boolean, BoringLayout+Metrics)
IsRtlCharAt(Int32)

Returns true if the character at offset is right to left (RTL).

(Inherited from Layout)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Make(ICharSequence, TextPaint, Int32, Layout+Alignment, BoringLayout+Metrics, Boolean, TextUtils+TruncateAt, Int32, Boolean)
Make(ICharSequence, TextPaint, Int32, Layout+Alignment, Single, Single, BoringLayout+Metrics, Boolean)

Utility function to construct a BoringLayout instance.

Make(ICharSequence, TextPaint, Int32, Layout+Alignment, Single, Single, BoringLayout+Metrics, Boolean, TextUtils+TruncateAt, Int32)

Utility function to construct a BoringLayout instance.

Make(String, TextPaint, Int32, Layout+Alignment, BoringLayout+Metrics, Boolean, TextUtils+TruncateAt, Int32, Boolean)
Make(String, TextPaint, Int32, Layout+Alignment, Single, Single, BoringLayout+Metrics, Boolean)

Utility function to construct a BoringLayout instance.

Make(String, TextPaint, Int32, Layout+Alignment, Single, Single, BoringLayout+Metrics, Boolean, TextUtils+TruncateAt, Int32)

Utility function to construct a BoringLayout instance.

Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
ReplaceOrMake(ICharSequence, TextPaint, Int32, Layout+Alignment, BoringLayout+Metrics, Boolean, TextUtils+TruncateAt, Int32, Boolean)
ReplaceOrMake(ICharSequence, TextPaint, Int32, Layout+Alignment, Single, Single, BoringLayout+Metrics, Boolean)

Returns a BoringLayout for the specified text, potentially reusing this one if it is already suitable.

ReplaceOrMake(ICharSequence, TextPaint, Int32, Layout+Alignment, Single, Single, BoringLayout+Metrics, Boolean, TextUtils+TruncateAt, Int32)

Returns a BoringLayout for the specified text, potentially reusing this one if it is already suitable.

ReplaceOrMake(String, TextPaint, Int32, Layout+Alignment, BoringLayout+Metrics, Boolean, TextUtils+TruncateAt, Int32, Boolean)
ReplaceOrMake(String, TextPaint, Int32, Layout+Alignment, Single, Single, BoringLayout+Metrics, Boolean)

Returns a BoringLayout for the specified text, potentially reusing this one if it is already suitable.

ReplaceOrMake(String, TextPaint, Int32, Layout+Alignment, Single, Single, BoringLayout+Metrics, Boolean, TextUtils+TruncateAt, Int32)

Returns a BoringLayout for the specified text, potentially reusing this one if it is already suitable.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to