CursorAdapter 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| 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)。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
CursorAdapter(IntPtr, JniHandleOwnership)
创建 JNI 对象的托管表示形式时使用的构造函数;由运行时调用。
protected CursorAdapter(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Widget.CursorAdapter : nativeint * Android.Runtime.JniHandleOwnership -> Android.Widget.CursorAdapter
参数
- transfer
- JniHandleOwnership
指示 JniHandleOwnership如何处理 javaReference
注解
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
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。
- 属性
注解
建议的构造函数。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
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
如果为 true,则每当适配器更改时都会对游标调用 requery(),以便始终显示最新的数据。 不建议在此处使用 true。
- 属性
注解
允许控制自动重新查询的构造函数。 建议不要使用此服务,而是建议不要 #CursorAdapter(Context, Cursor, int)使用它。 使用此构造函数时, #FLAG_REGISTER_CONTENT_OBSERVER 将始终设置。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。