ListView

Class of android.widget · ListView.java · Android's reference

public class ListView extends AbsListView

ListView ← AbsListView

A vertical list: the items of the adapter, one under the other, from a first position and an offset.

Nested types

Extended in the framework by

Constructors

public ListView(Context context) source
public ListView(Context context, AttributeSet attrs) source
public ListView(Context context, AttributeSet attrs, int defStyleAttr) source
public ListView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) source

Methods

public void addHeaderView(View v, Object data, boolean isSelectable) source
public void addHeaderView(View v) source
public int getHeaderViewsCount() source
public boolean removeHeaderView(View v) source
public void addFooterView(View v, Object data, boolean isSelectable) source
public void addFooterView(View v) source
public int getFooterViewsCount() source
public boolean removeFooterView(View v) source
public ListAdapter getAdapter() source
public void setAdapter(ListAdapter adapter) source
public void setSelection(int position) source
public void setDivider(Drawable divider) source
public Drawable getDivider() source
public void setDividerHeight(int height) source
public int getDividerHeight() source
public void setHeaderDividersEnabled(boolean enabled) source
public boolean areHeaderDividersEnabled() source
public void setFooterDividersEnabled(boolean enabled) source
public boolean areFooterDividersEnabled() source
public void setItemsCanFocus(boolean itemsCanFocus) source
public boolean getItemsCanFocus() source
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) source
protected void onLayout(boolean changed, int l, int t, int r, int b) source
protected void layoutChildren() source

Places the items that the list shows, from the first position and its offset, and keeps the list filled to its end.

protected void dispatchDraw(Canvas canvas) source
public CharSequence getAccessibilityClassName() source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.