ResourceCursorAdapter
abstract class ResourceCursorAdapter : CursorAdapter
| kotlin.Any | |||
| ↳ | android.widget.BaseAdapter | ||
| ↳ | androidx.cursoradapter.widget.CursorAdapter | ||
| ↳ | androidx.cursoradapter.widget.ResourceCursorAdapter |
SimpleCursorAdapter |
Static library support version of the framework's |
Static library support version of the framework's android.widget.ResourceCursorAdapter. Used to write apps that run on platforms prior to Android 3.0. When running on Android 3.0 or above, this implementation is still used; it does not try to switch to the framework's implementation. See the framework SDK documentation for a class overview.
Summary
Public constructors |
|---|
This function is deprecated. This option is discouraged, as it results in Cursor queries being performed on the application's UI thread and thus can cause poor responsiveness or even Application Not Responding errors. |
This function is deprecated. This option is discouraged, as it results in Cursor queries being performed on the application's UI thread and thus can cause poor responsiveness or even Application Not Responding errors. |
ResourceCursorAdapter(context: Context!, layout: Int, c: Cursor!, flags: Int)Standard constructor. |
Public functions |
|
|---|---|
View! |
newDropDownView(context: Context!, cursor: Cursor!, parent: ViewGroup!)Makes a new drop down view to hold the data pointed to by cursor. |
View! |
Inflates view(s) from the specified XML file. |
Unit |
setDropDownViewResource(dropDownLayout: Int)Sets the layout resource of the drop down views. |
Unit |
setViewResource(layout: Int)Sets the layout resource of the item views. |
Inherited Constants |
||||
|---|---|---|---|---|
|
||||
|
Inherited functions |
||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
Public constructors
ResourceCursorAdapter(context: Context!, layout: Int, c: Cursor!)
Constructor the enables auto-requery.
ResourceCursorAdapter(
context: Context!,
layout: Int,
c: Cursor!,
autoRequery: Boolean
)
Constructor with default behavior as per CursorAdapter; it is recommended you not use this, but instead ResourceCursorAdapter. When using this constructor, FLAG_REGISTER_CONTENT_OBSERVER will always be set.
| Parameters | |
|---|---|
context: Context! |
The context where the ListView associated with this adapter is running |
layout: Int |
resource identifier of a layout file that defines the views for this list item. Unless you override them later, this will define both the item views and the drop down views. |
c: Cursor! |
The cursor from which to get the data. |
autoRequery: Boolean |
If true the adapter will call requery() on the cursor whenever it changes so the most recent data is always displayed. Using true here is discouraged. |
ResourceCursorAdapter
ResourceCursorAdapter(context: Context!, layout: Int, c: Cursor!, flags: Int)
Standard constructor.
| Parameters | |
|---|---|
context: Context! |
The context where the ListView associated with this adapter is running |
layout: Int |
Resource identifier of a layout file that defines the views for this list item. Unless you override them later, this will define both the item views and the drop down views. |
c: Cursor! |
The cursor from which to get the data. |
flags: Int |
Flags used to determine the behavior of the adapter, as per |
Public functions
newDropDownView
fun newDropDownView(context: Context!, cursor: Cursor!, parent: ViewGroup!): View!
Makes a new drop down view to hold the data pointed to by cursor.
| Parameters | |
|---|---|
context: Context! |
Interface to application's global information |
cursor: Cursor! |
The cursor from which to get the data. The cursor is already moved to the correct position. |
parent: ViewGroup! |
The parent to which the new view is attached to |
| Returns | |
|---|---|
View! |
the newly created view. |
newView
fun newView(context: Context!, cursor: Cursor!, parent: ViewGroup!): View!
Inflates view(s) from the specified XML file.
| See also | |
|---|---|
newView |
setDropDownViewResource
fun setDropDownViewResource(dropDownLayout: Int): Unit
Sets the layout resource of the drop down views.
| Parameters | |
|---|---|
dropDownLayout: Int |
the layout resources used to create drop down views |
setViewResource
fun setViewResource(layout: Int): Unit
Sets the layout resource of the item views.
| Parameters | |
|---|---|
layout: Int |
the layout resources used to create item views |