Package com.naver.ads.util
Object TextViewUtils
-
- All Implemented Interfaces:
public class TextViewUtilsMiscellaneous TextView utility methods.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classTextViewUtils.TextMeasurementParamsThe text measurement parameters.
-
Field Summary
Fields Modifier and Type Field Description public final static TextViewUtilsINSTANCE
-
Method Summary
Modifier and Type Method Description final static StaticLayoutgetStaticLayout(TextView $self, CharSequence s)Returns the StaticLayout. final static StaticLayoutgetStaticLayout(TextViewUtils.TextMeasurementParams $self, CharSequence s)Returns the StaticLayout. final static List<CharSequence>getTextLines(TextView $self, CharSequence s)Splits text into lines using the given s and the same algorithm as used by the TextView component. final static List<CharSequence>getTextLines(TextViewUtils.TextMeasurementParams $self, CharSequence s)Splits text into lines using specified parameters and the same algorithm as used by the TextView component. final static IntegergetTextLineCount(TextView $self, CharSequence s)Returns the number of lines of text using the given s and the same algorithm used by the TextView component final static IntegergetTextLineCount(TextViewUtils.TextMeasurementParams $self, CharSequence s)Returns the number of lines of text using the given s and the same algorithm used by the TextView component final static TextViewUtils.TextMeasurementParamstoTextMeasurementParams(TextView $self)Returns parameters for text measurement. -
-
Method Detail
-
getStaticLayout
final static StaticLayout getStaticLayout(TextView $self, CharSequence s)
Returns the StaticLayout.
-
getStaticLayout
final static StaticLayout getStaticLayout(TextViewUtils.TextMeasurementParams $self, CharSequence s)
Returns the StaticLayout.
-
getTextLines
final static List<CharSequence> getTextLines(TextView $self, CharSequence s)
- Parameters:
s- the text to split.- Returns:
the splitted text into lines.
-
getTextLines
final static List<CharSequence> getTextLines(TextViewUtils.TextMeasurementParams $self, CharSequence s)
Splits text into lines using specified parameters and the same algorithm as used by the TextView component.
- Parameters:
s- the text to split.- Returns:
the splitted text into lines.
-
getTextLineCount
final static Integer getTextLineCount(TextView $self, CharSequence s)
Returns the number of lines of text using the given s and the same algorithm used by the TextView component
- Parameters:
s- the text to count the number of text lines.- Returns:
the number of lines of text.
-
getTextLineCount
final static Integer getTextLineCount(TextViewUtils.TextMeasurementParams $self, CharSequence s)
Returns the number of lines of text using the given s and the same algorithm used by the TextView component
- Parameters:
s- the text to count the number of text lines.- Returns:
the number of lines of text.
-
toTextMeasurementParams
final static TextViewUtils.TextMeasurementParams toTextMeasurementParams(TextView $self)
Returns parameters for text measurement.
-
-
-
-