Język

TextUtils.EllipsizeFormatted Method

Definition

Overloads

Name Description
EllipsizeFormatted(ICharSequence, TextPaint, Single, TextUtils+TruncateAt)

Returns the original text if it fits in the specified width given the properties of the specified Paint, or, if it does not fit, a truncated copy with ellipsis character added at the specified edge or center.

EllipsizeFormatted(ICharSequence, TextPaint, Single, TextUtils+TruncateAt, Boolean, TextUtils+IEllipsizeCallback)

Returns the original text if it fits in the specified width given the properties of the specified Paint, or, if it does not fit, a truncated copy with ellipsis character added at the specified edge or center.

EllipsizeFormatted(ICharSequence, TextPaint, Single, TextUtils+TruncateAt)

Returns the original text if it fits in the specified width given the properties of the specified Paint, or, if it does not fit, a truncated copy with ellipsis character added at the specified edge or center.

[Android.Runtime.Register("ellipsize", "(Ljava/lang/CharSequence;Landroid/text/TextPaint;FLandroid/text/TextUtils$TruncateAt;)Ljava/lang/CharSequence;", "")]
public static Java.Lang.ICharSequence? EllipsizeFormatted(Java.Lang.ICharSequence? text, Android.Text.TextPaint? p, float avail, Android.Text.TextUtils.TruncateAt? where);
[<Android.Runtime.Register("ellipsize", "(Ljava/lang/CharSequence;Landroid/text/TextPaint;FLandroid/text/TextUtils$TruncateAt;)Ljava/lang/CharSequence;", "")>]
static member EllipsizeFormatted : Java.Lang.ICharSequence * Android.Text.TextPaint * single * Android.Text.TextUtils.TruncateAt -> Java.Lang.ICharSequence

Parameters

avail
Single

Returns

Attributes

Remarks

Returns the original text if it fits in the specified width given the properties of the specified Paint, or, if it does not fit, a truncated copy with ellipsis character added at the specified edge or center.

Android reference for android.text.TextUtils.ellipsize.

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

EllipsizeFormatted(ICharSequence, TextPaint, Single, TextUtils+TruncateAt, Boolean, TextUtils+IEllipsizeCallback)

Returns the original text if it fits in the specified width given the properties of the specified Paint, or, if it does not fit, a truncated copy with ellipsis character added at the specified edge or center.

[Android.Runtime.Register("ellipsize", "(Ljava/lang/CharSequence;Landroid/text/TextPaint;FLandroid/text/TextUtils$TruncateAt;ZLandroid/text/TextUtils$EllipsizeCallback;)Ljava/lang/CharSequence;", "")]
public static Java.Lang.ICharSequence? EllipsizeFormatted(Java.Lang.ICharSequence? text, Android.Text.TextPaint? paint, float avail, Android.Text.TextUtils.TruncateAt? where, bool preserveLength, Android.Text.TextUtils.IEllipsizeCallback? callback);
[<Android.Runtime.Register("ellipsize", "(Ljava/lang/CharSequence;Landroid/text/TextPaint;FLandroid/text/TextUtils$TruncateAt;ZLandroid/text/TextUtils$EllipsizeCallback;)Ljava/lang/CharSequence;", "")>]
static member EllipsizeFormatted : Java.Lang.ICharSequence * Android.Text.TextPaint * single * Android.Text.TextUtils.TruncateAt * bool * Android.Text.TextUtils.IEllipsizeCallback -> Java.Lang.ICharSequence

Parameters

paint
TextPaint
avail
Single
preserveLength
Boolean

Returns

Attributes

Remarks

Returns the original text if it fits in the specified width given the properties of the specified Paint, or, if it does not fit, a copy with ellipsis character added at the specified edge or center. If preserveLength is specified, the returned copy will be padded with zero-width spaces to preserve the original length and offsets instead of truncating. If callback is non-null, it will be called to report the start and end of the ellipsized range. TextDirection is determined by the first strong directional character.

Android reference for android.text.TextUtils.ellipsize.

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