java.lang.Object | ||
↳ | android.widget.BaseAdapter | |
↳ | com.google.android.gms.drive.widget.DataBufferAdapter<T> |
A concrete BaseAdapter that is backed by concatenated DataBuffers. The assumptions and behaviors of this adapter parallel those of the ArrayAdapter:
If you need to modify how the objects display in the TextView, override their toString() method.
In addition, any DataBuffers added to this adapter are managed entirely by this adapter,
including their life cycle. Be sure to call clear()
anywhere you would otherwise close
the data buffers used here, and if you want to manage their life cycles more granularly, you will
need to override the behavior of clear(), as well as add your own management methods to
ensure resources are properly managed within your application.
If you need something other than a single TextView for the data in this adapter, override
getView(int, View, ViewGroup)
to populate and return the type of view you want.
[Expand]
Inherited Constants | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]()
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Appends the specified buffer to the end of the adapter.
| |||||||||||
Closes and removes all buffers, and so all elements, from the adapter.
| |||||||||||
This will also re-enable automatic notifications.
| |||||||||||
Sets the layout resource to create the drop down views.
| |||||||||||
Control whether methods that change the list ( |
[Expand]
Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||||||||||||||||||||||||
![]() | |||||||||||||||||||||||||||||||||
![]() | |||||||||||||||||||||||||||||||||
![]() | |||||||||||||||||||||||||||||||||
![]() |
Closes and removes all buffers, and so all elements, from the adapter.
CursorIndexOutOfBoundsException |
---|
This will also re-enable automatic notifications. Pairing this with setNotifyOnChange(boolean)
gives the ability to make a series of changes to the adapter without triggering multiple
notifications at the same time. Use these two methods together to temporarily disable
notifications for the purpose of batching operations on the adapter.
Sets the layout resource to create the drop down views.
Control whether methods that change the list (append(DataBuffer
, clear()
)
automatically call notifyDataSetChanged()
. If set to false, caller must manually call
notifyDataSetChanged() to have the changes reflected in the attached view.
The default is true, and calling notifyDataSetChanged() resets the flag to true. Use this method if you want to make several changes to the adapter in a row, and don't need the view to update in between changes. This reduces the processing load for each operation significantly.
notifyOnChange | if true, modifications to the list will automatically call notifyDataSetChanged()
|
---|