語言

ArrayAdapter.CreateFromResource(Context, Int32, Int32) 方法

定義

從外部資源建立新的 ArrayAdapter。

[Android.Runtime.Register("createFromResource", "(Landroid/content/Context;II)Landroid/widget/ArrayAdapter;", "")]
public static Android.Widget.ArrayAdapter CreateFromResource(Android.Content.Context context, int textArrayResId, int textViewResId);
[<Android.Runtime.Register("createFromResource", "(Landroid/content/Context;II)Landroid/widget/ArrayAdapter;", "")>]
static member CreateFromResource : Android.Content.Context * int * int -> Android.Widget.ArrayAdapter

參數

context
Context

應用程式的環境。

textArrayResId
Int32

作為資料來源的陣列識別碼。

textViewResId
Int32

用於建立視圖的版面識別碼。

傳回

一個 ArrayAdapter<的 CharSequence>。

屬性

備註

從外部資源建立新的 ArrayAdapter。 陣列內容可透過 android.content.res.Resources#getTextArray(int)取得。

Java 文件 android.widget.ArrayAdapter.createFromResource(android.content.Context, int, int)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於