Stay organized with collections Save and categorize content based on your preferences.
added in version 22.1.0
belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1

VerticalGridView

public class VerticalGridView
extends BaseGridView

java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.support.v7.widget.RecyclerView
         ↳ android.support.v17.leanback.widget.BaseGridView
           ↳ android.support.v17.leanback.widget.VerticalGridView


A ViewGroup that shows items in a vertically scrolling list. The items come from the RecyclerView.Adapter associated with this view.

RecyclerView.Adapter can optionally implement FacetProviderAdapter which provides FacetProvider for a given view type; RecyclerView.ViewHolder can also implement FacetProvider. Facet from ViewHolder has a higher priority than the one from FacetProviderAdapter associated with viewType. Supported optional facets are:

  1. ItemAlignmentFacet When this facet is provided by ViewHolder or FacetProviderAdapter, it will override the item alignment settings set on VerticalGridView. This facet also allows multiple alignment positions within one ViewHolder.

Summary

Inherited XML attributes

From class android.support.v7.widget.RecyclerView

Inherited constants

From class android.support.v17.leanback.widget.BaseGridView
From class android.support.v7.widget.RecyclerView
From class android.view.ViewGroup
From class android.view.View

Inherited fields

From class android.view.View

Public constructors

VerticalGridView(Context context)
VerticalGridView(Context context, AttributeSet attrs)
VerticalGridView(Context context, AttributeSet attrs, int defStyle)

Public methods

void setColumnWidth(int width)

Sets the column width.

void setNumColumns(int numColumns)

Sets the number of columns.

Protected methods

void initAttributes(Context context, AttributeSet attrs)

Inherited methods

From class android.support.v17.leanback.widget.BaseGridView