다음을 통해 공유


TextUtils.CommaEllipsize(String, TextPaint, Single, String, String) 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".

public static string? CommaEllipsize (string? text, Android.Text.TextPaint? p, float avail, string? oneMore, string? more);
static member CommaEllipsize : string * Android.Text.TextPaint * single * string * string -> string

Parameters

text
String

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

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