語言

CursorAdapter 建構函式

定義

多載

名稱 Description
CursorAdapter(Context, ICursor)
已淘汰.

一個總是能啟用自動重新查詢的建構器。

CursorAdapter(IntPtr, JniHandleOwnership)

用於建立 JNI 物件受管理表示的建構器;由執行時呼叫。

CursorAdapter(Context, ICursor, CursorAdapterFlags)

推薦的建造者。

CursorAdapter(Context, ICursor, Boolean)

一個允許控制自動重新查詢的建構器。

CursorAdapter(Context, ICursor)

警告

deprecated

一個總是能啟用自動重新查詢的建構器。

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/database/Cursor;)V", "")]
[System.Obsolete("deprecated")]
public CursorAdapter(Android.Content.Context? context, Android.Database.ICursor? c);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/database/Cursor;)V", "")>]
[<System.Obsolete("deprecated")>]
new Android.Widget.CursorAdapter : Android.Content.Context * Android.Database.ICursor -> Android.Widget.CursorAdapter

參數

context
Context

背景

c
ICursor

用來取得資料的游標。

屬性

備註

一個總是能啟用自動重新查詢的建構器。

此會員已被棄用。 此選項不被建議,因為會導致游標查詢在應用程式的 UI 執行緒上執行,可能導致反應不佳甚至應用程式未回應錯誤。 作為替代,使用 android.app.LoaderManager 帶有 android.content.CursorLoader.

Java 文件 android.widget.CursorAdapter.CursorAdapter(android.content.Context, android.database.Cursor)。

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

適用於

CursorAdapter(IntPtr, JniHandleOwnership)

用於建立 JNI 物件受管理表示的建構器;由執行時呼叫。

protected CursorAdapter(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Widget.CursorAdapter : nativeint * Android.Runtime.JniHandleOwnership -> Android.Widget.CursorAdapter

參數

javaReference
IntPtr

nativeint

IntPtrA 包含一個 Java 原生介面(JNI)物件參考。

transfer
JniHandleOwnership

JniHandleOwnershipA 指示如何處理javaReference

備註

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

適用於

CursorAdapter(Context, ICursor, CursorAdapterFlags)

推薦的建造者。

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/database/Cursor;I)V", "")]
public CursorAdapter(Android.Content.Context? context, Android.Database.ICursor? c, Android.Widget.CursorAdapterFlags flags);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/database/Cursor;I)V", "")>]
new Android.Widget.CursorAdapter : Android.Content.Context * Android.Database.ICursor * Android.Widget.CursorAdapterFlags -> Android.Widget.CursorAdapter

參數

context
Context

背景

c
ICursor

用來取得資料的游標。

flags
CursorAdapterFlags

用於判斷轉接器行為的旗標;可以是 和 #FLAG_AUTO_REQUERY的任意組合#FLAG_REGISTER_CONTENT_OBSERVER。

屬性

備註

推薦的建造者。

Java 文件 android.widget.CursorAdapter.CursorAdapter(android.content.Context, android.database.Cursor, int)。

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

適用於

CursorAdapter(Context, ICursor, Boolean)

一個允許控制自動重新查詢的建構器。

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/database/Cursor;Z)V", "")]
public CursorAdapter(Android.Content.Context? context, Android.Database.ICursor? c, bool autoRequery);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/database/Cursor;Z)V", "")>]
new Android.Widget.CursorAdapter : Android.Content.Context * Android.Database.ICursor * bool -> Android.Widget.CursorAdapter

參數

context
Context

背景

c
ICursor

用來取得資料的游標。

autoRequery
Boolean

如果為真,介面卡會在游標變更時呼叫 requery(),因此資料會顯示最新的。 這裡不建議使用 true。

屬性

備註

一個允許控制自動重新查詢的建構器。 建議你不要使用這個,而是改用 #CursorAdapter(Context, Cursor, int)。 使用此建構子時, #FLAG_REGISTER_CONTENT_OBSERVER 總是設定為 。

Java 文件 android.widget.CursorAdapter.CursorAdapter(android.content.Context, android.database.Cursor, boolean)。

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

適用於