Dela via


TextUtils.CommaEllipsizeFormatted Method

Definition

Converts a CharSequence of the comma-separated form "Andy, Bob, Charles, David" that is too wide to fit into the specified width into one like "Andy, Bob, 2 more".

[Android.Runtime.Register("commaEllipsize", "(Ljava/lang/CharSequence;Landroid/text/TextPaint;FLjava/lang/String;Ljava/lang/String;)Ljava/lang/CharSequence;", "")]
public static Java.Lang.ICharSequence? CommaEllipsizeFormatted (Java.Lang.ICharSequence? text, Android.Text.TextPaint? p, float avail, string? oneMore, string? more);
[<Android.Runtime.Register("commaEllipsize", "(Ljava/lang/CharSequence;Landroid/text/TextPaint;FLjava/lang/String;Ljava/lang/String;)Ljava/lang/CharSequence;", "")>]
static member CommaEllipsizeFormatted : Java.Lang.ICharSequence * Android.Text.TextPaint * single * string * string -> Java.Lang.ICharSequence

Parameters

text
ICharSequence

the text to truncate

p
TextPaint

the Paint with which to measure the text

avail
Single

the horizontal width available for the text (in pixels)

oneMore
String

the string for "1 more" in the current locale

more
String

the string for "%d more" in the current locale

Returns

Attributes

Remarks

Converts a CharSequence of the comma-separated form "Andy, Bob, Charles, David" that is too wide to fit into the specified width into one like "Andy, Bob, 2 more".

This member is deprecated. Do not use. This is not internationalized, and has known issues with right-to-left text, languages that have more than one plural form, languages that use a different character as a comma-like separator, etc. Use #listEllipsize instead.

Java documentation for android.text.TextUtils.commaEllipsize(java.lang.CharSequence, android.text.TextPaint, float, java.lang.String, java.lang.String).

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