Android Guides | Samples

Android.Content.Res.Resources.GetTextFormatted Method

Return the string value associated with a particular resource ID.

Syntax

[Android.Runtime.Register("getText", "(ILjava/lang/CharSequence;)Ljava/lang/CharSequence;", "GetGetText_ILjava_lang_CharSequence_Handler")]
public virtual ICharSequence GetTextFormatted (Int32 id, ICharSequence def)

Parameters

id
The desired resource identifier, as generated by the aapt tool. This integer encodes the package, type, and resource entry. The value 0 is an invalid identifier.
def
The default CharSequence to return.

Remarks

Return the string value associated with a particular resource ID. The returned object will be a String if this is a plain string; it will be some other type of CharSequence if it is styled.

[Android Documentation]

Requirements

Namespace: Android.Content.Res
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1