LocaleSpan
open class LocaleSpan : MetricAffectingSpan, ParcelableSpan
Changes the Locale
of the text to which the span is attached.
Summary
Inherited functions |
From class MetricAffectingSpan
MetricAffectingSpan! |
getUnderlying()
Returns "this" for most MetricAffectingSpans, but for MetricAffectingSpans that were generated by wrap , returns the underlying MetricAffectingSpan.
|
|
From class CharacterStyle
Unit |
updateDrawState(tp: TextPaint!)
|
CharacterStyle! |
wrap(cs: CharacterStyle!)
A given CharacterStyle can only applied to a single region of a given Spanned. If you need to attach the same CharacterStyle to multiple regions, you can use this method to wrap it with a new object that will have the same effect but be a distinct object so that it can also be attached without conflict.
|
|
Public constructors
LocaleSpan
LocaleSpan(locales: LocaleList)
Creates a LocaleSpan
from LocaleList
.
Parameters |
locales |
LocaleList: The LocaleList of the text to which the span is attached. This value cannot be null . |
Exceptions |
java.lang.NullPointerException |
if locales is null |
LocaleSpan
LocaleSpan(source: Parcel!)
Public methods
describeContents
open fun describeContents(): Int
getLocale
open fun getLocale(): Locale?
Return |
Locale? |
The Locale for this span. If multiple locales are associated with this span, only the first locale is returned. null if no Locale is specified. |
getLocales
open fun getLocales(): LocaleList
Return |
LocaleList |
The entire list of locales that are associated with this span. This value cannot be null . |
getSpanTypeId
open fun getSpanTypeId(): Int
toString
open fun toString(): String
Return |
String |
a string representation of the object. |
updateMeasureState
open fun updateMeasureState(paint: TextPaint): Unit
Parameters |
textPaint |
the paint used for drawing the text This value cannot be null . |
writeToParcel
open fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[]]