Skip to main content

Adapter

declare interface Adapter {}

Adapter

Instance Method

getCount

declare class Adapter {
getCount():void;
}
  • Description

    How many items are in the data set represented by this Adapter.

getItem

declare class Adapter {
getItem(position: number): Object;
}
  • Description

    Get the data item associated with the specified position in the data set.

getViewTypeCount

declare class Adapter {
getViewTypeCount(): number;
}
  • Description

    Returns the number of types of Views that will be created by getView(int, View, ViewGroup).

isEmpty

declare class Adapter {
isEmpty(): boolean;
}
  • Description

    Check adapter is empty.

getItemId

declare class Adapter {
getItemId(position: number): number;
}
  • Description

    Get the row id associated with the specified position in the list.

hasStableIds

declare class Adapter {
hasStableIds(): boolean;
}
  • Description

    Indicates whether the item ids are stable across changes to the underlying data.

getView

declare class Adapter {
getView(position: number, convertView: View, parent: ViewGroup): View;
}
  • Description

    Get a View that displays the data at the specified position in the data set.

getItemViewType

declare class Adapter {
getItemViewType(position: number): number;
}
  • Description

    Get the type of View that will be created by getView(int, View, ViewGroup) for the specified item.