public interface

Adapter

com.neomades.ui.Adapter
Known Indirect Subclasses

Class Overview

An Adapter object acts as a bridge between a View and the underlying data for that view.

The Adapter provides access to the data items. The Adapter is also responsible for making a View for each item in the data set.

Summary

Public Methods
abstract boolean areAllItemsEnabled()
Indicates whether all the items in this adapter are enabled.
abstract boolean isEnabled(int position)
Returns true if the item at the specified position is not a separator.

Public Methods

public abstract 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.

public abstract 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