Make one of the views resulting from newView
display a particular
item
.
Make one of the views resulting from newView
display a particular
item
. The default implementation uses the
UiBinder object passed in as a constructor
argument, for which the default is the UiBinder
singleton.
If the view
is a TextView
, and no other arrangements have been
made, this will effectively do view.setText(item.toString)
. See
the documentation on UiBinder for how to
easily make it do something smarter (e.g., loading views with the
values of properties named by their resource IDs).
Get number of items in the current sequence
Get number of items in the current sequence
Get the n'th item from the current sequence
Get the n'th item from the current sequence
Get the id of the n'th item from the current sequence
Get the id of the n'th item from the current sequence
Get a view to use for the given position.
Get a view to use for the given position. Ordinarily delegates to the
newView
and bindView
methods, q.v.
Create a new view to display items (if our AdapterView
's pool has
no spares).
Create a new view to display items (if our AdapterView
's pool has
no spares).
If it's not overridden, and if an itemViewResourceId
was supplied
to the constructor, the default implementation will use a layout
inflater to inflate that resource, and return the result.
Method to reset the sequence if a new copy was (or might have been) loaded off the UI thread.
Adapter for Scala
IndexedSeq
s.Supports
newView
andbindView
methods, analogous to those provided by the base framework'sCursorAdapter
(thoughnewView
takes only the parentViewGroup
as an argument).Note that the
T <: Object
restriction is needed so that ourgetItem( _: Int ):T
is compatible with the declaredgetItem( _: Int ): java.lang.Object
in the Adapter interface. So, if you really want an adapter for anIndexedSeq[Long]
, you're on your own.The
itemViewResourceId
anditemTextResourceId
constructor arguments are optional, but are used by the default implementations ofnewView
andbindView
, q.v., to handle simple cases with a minimum of extra code.