Package icyllis.modernui.widget

# Interface ListAdapter

All Superinterfaces:
  `Adapter`

All Known Subinterfaces:
  `WrapperListAdapter`

All Known Implementing Classes:
  `ArrayAdapter`, `BaseAdapter`, `HeaderViewListAdapter`, `MenuAdapter`

public interface ListAdapter extends Adapter
Extended `Adapter` that is the bridge between a `ListView` and the data that backs the list. Frequently that data comes from a Cursor, but that is not required. The ListView can display any data provided that it is wrapped in a ListAdapter.

- ## Field Summary

  ### Fields inherited from interface icyllis.modernui.widget.Adapter

  `IGNORE_ITEM_VIEW_TYPE, NO_SELECTION`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `areAllItemsEnabled()`
  Indicates whether all the items in this adapter are enabled.
  `boolean`
  `isEnabled(int position)`
  Returns true if the item at the specified position is not a separator.

  ### Methods inherited from interface icyllis.modernui.widget.Adapter

  `getCount, getItem, getItemId, getItemViewType, getView, getViewTypeCount, hasStableIds, isEmpty, registerDataSetObserver, unregisterDataSetObserver`

- ## Method Details

  - ### areAllItemsEnabled

    boolean areAllItemsEnabled()
    Indicates whether all the items in this adapter are enabled. If the value returned by this method changes over time, there is no guarantee it will take effect. If true, it means all items are selectable and clickable (there is no separator.)
    Returns:
      True if all items are enabled, false otherwise.
    See Also:
      - `isEnabled(int)`

  - ### isEnabled

    boolean isEnabled(int position)
    Returns true if the item at the specified position is not a separator. (A separator is a non-selectable, non-clickable item).

    The result is unspecified if position is invalid. An `ArrayIndexOutOfBoundsException` should be thrown in that case for fast failure.

    Parameters:
      `position` - Index of the item
    Returns:
      True if the item is not a separator
    See Also:
      - `areAllItemsEnabled()`