TypedValue.CoerceToString Method

Definition

Overloads

CoerceToString()

Regardless of the actual type of the value, try to convert it to a string value.

CoerceToString(DataType, Int32)

Perform type conversion as per #coerceToString() on an explicitly supplied type and data.

CoerceToString()

Regardless of the actual type of the value, try to convert it to a string value.

public string? CoerceToString ();
member this.CoerceToString : unit -> string

Returns

CharSequence The coerced string value. If the value is null or the type is not known, null is returned.

Remarks

Regardless of the actual type of the value, try to convert it to a string value. For example, a color type will be converted to a string of the form #aarrggbb.

Java documentation for android.util.TypedValue.coerceToString().

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

CoerceToString(DataType, Int32)

Perform type conversion as per #coerceToString() on an explicitly supplied type and data.

[Android.Runtime.Register("coerceToString", "(II)Ljava/lang/String;", "")]
public static string? CoerceToString (Android.Util.DataType type, int data);
[<Android.Runtime.Register("coerceToString", "(II)Ljava/lang/String;", "")>]
static member CoerceToString : Android.Util.DataType * int -> string

Parameters

type
DataType

The data type identifier.

data
Int32

The data value.

Returns

String The coerced string value. If the value is null or the type is not known, null is returned.

Attributes

Remarks

Perform type conversion as per #coerceToString() on an explicitly supplied type and data.

Java documentation for android.util.TypedValue.coerceToString(int, int).

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