다음을 통해 공유


TypedArray.GetString(Int32) Method

Definition

Retrieves the string value for the attribute at <var>index</var>.

[Android.Runtime.Register("getString", "(I)Ljava/lang/String;", "GetGetString_IHandler")]
public virtual string? GetString (int index);
[<Android.Runtime.Register("getString", "(I)Ljava/lang/String;", "GetGetString_IHandler")>]
abstract member GetString : int -> string
override this.GetString : int -> string

Parameters

index
Int32

Index of attribute to retrieve.

Returns

String holding string data. Any styling information is removed. Returns null if the attribute is not defined or could not be coerced to a string.

Attributes

Exceptions

if the TypedArray has already been recycled.

Remarks

Retrieves the string value for the attribute at <var>index</var>.

If the attribute is not a string, this method will attempt to coerce it to a string.

Java documentation for android.content.res.TypedArray.getString(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