org.positronicnet.ui

IndexedSeqAdapter

class IndexedSeqAdapter [T <: AnyRef] extends BaseAdapter

Adapter for Scala IndexedSeqs.

Supports newView and bindView methods, analogous to those provided by the base framework's CursorAdapter (though newView takes only the parent ViewGroup as an argument).

Note that the T <: Object restriction is needed so that our getItem( _: Int ):T is compatible with the declared getItem( _: Int ): java.lang.Object in the Adapter interface. So, if you really want an adapter for an IndexedSeq[Long], you're on your own.

The itemViewResourceId and itemTextResourceId constructor arguments are optional, but are used by the default implementations of newView and bindView, q.v., to handle simple cases with a minimum of extra code.

Linear Supertypes
BaseAdapter, SpinnerAdapter, ListAdapter, Adapter, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. IndexedSeqAdapter
  2. BaseAdapter
  3. SpinnerAdapter
  4. ListAdapter
  5. Adapter
  6. AnyRef
  7. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new IndexedSeqAdapter (seq: IndexedSeq[T], itemViewResourceId: Int, binder: UiBinder)

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. def areAllItemsEnabled (): Boolean

    Definition Classes
    BaseAdapter → ListAdapter
  7. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  8. def bindView (view: View, item: T): Unit

    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).

  9. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  10. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  11. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  12. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef
  14. def getCount (): Int

    Get number of items in the current sequence

    Get number of items in the current sequence

    Definition Classes
    IndexedSeqAdapter → Adapter
  15. def getDropDownView (arg0: Int, arg1: View, arg2: ViewGroup): View

    Definition Classes
    BaseAdapter → SpinnerAdapter
  16. def getItem (position: Int): T

    Get the n'th item from the current sequence

    Get the n'th item from the current sequence

    Definition Classes
    IndexedSeqAdapter → Adapter
  17. def getItemId (position: Int): Long

    Get the id of the n'th item from the current sequence

    Get the id of the n'th item from the current sequence

    Definition Classes
    IndexedSeqAdapter → Adapter
  18. def getItemViewType (arg0: Int): Int

    Definition Classes
    BaseAdapter → Adapter
  19. def getView (position: Int, convertView: View, parent: ViewGroup): View

    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.

    Definition Classes
    IndexedSeqAdapter → Adapter
  20. def getViewTypeCount (): Int

    Definition Classes
    BaseAdapter → Adapter
  21. def hasStableIds (): Boolean

    Definition Classes
    BaseAdapter → Adapter
  22. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  23. var inflater : LayoutInflater

    Attributes
    protected
  24. def isEmpty (): Boolean

    Definition Classes
    BaseAdapter → Adapter
  25. def isEnabled (arg0: Int): Boolean

    Definition Classes
    BaseAdapter → ListAdapter
  26. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  27. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  28. def newView (parent: ViewGroup): View

    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.

  29. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  30. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  31. def notifyDataSetChanged (): Unit

    Definition Classes
    BaseAdapter
  32. def notifyDataSetInvalidated (): Unit

    Definition Classes
    BaseAdapter
  33. def registerDataSetObserver (arg0: DataSetObserver): Unit

    Definition Classes
    BaseAdapter → Adapter
  34. def resetSeq (newSeq: IndexedSeq[T]): Unit

    Method to reset the sequence if a new copy was (or might have been) loaded off the UI thread.

  35. var seq : IndexedSeq[T]

    Attributes
    protected
  36. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  37. def toString (): String

    Definition Classes
    AnyRef → Any
  38. def unregisterDataSetObserver (arg0: DataSetObserver): Unit

    Definition Classes
    BaseAdapter → Adapter
  39. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  40. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  41. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from BaseAdapter

Inherited from SpinnerAdapter

Inherited from ListAdapter

Inherited from Adapter

Inherited from AnyRef

Inherited from Any