added in version 22.1.0
belongs to Maven artifact
Deprecated since version 27.1.0


public class VerticalGridFragment
extends BaseFragment


This class was deprecated in API level 27.1.0.
use VerticalGridSupportFragment

A fragment for creating leanback vertical grids.

Renders a vertical grid of objects given a VerticalGridPresenter and an ObjectAdapter.


Inherited constants

From interface android.content.ComponentCallbacks2

Public constructors


Public methods

ObjectAdapter getAdapter()

Returns the object adapter.

VerticalGridPresenter getGridPresenter()

Returns the grid presenter.

OnItemViewClickedListener getOnItemViewClickedListener()

Returns the item clicked listener.

View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
void onDestroyView()
void onStart()
void setAdapter(ObjectAdapter adapter)

Sets the object adapter for the fragment.

void setGridPresenter(VerticalGridPresenter gridPresenter)

Sets the grid presenter.

void setOnItemViewClickedListener(OnItemViewClickedListener listener)

Sets an item clicked listener.

void setOnItemViewSelectedListener(OnItemViewSelectedListener listener)

Sets an item selection listener.

void setSelectedPosition(int position)

Sets the selected item position.

Protected methods

Object createEntranceTransition()

Create entrance transition.

void runEntranceTransition(Object entranceTransition)

Run entrance transition.

Inherited methods