public class

BrowseFragment.MainFragmentRowsAdapter<T extends Fragment>

extends java.lang.Object

 java.lang.Object

↳androidx.leanback.app.BrowseFragment.MainFragmentRowsAdapter<T>

Subclasses:

RowsFragment.MainFragmentRowsAdapter

Overview

This is used to pass information to RowsFragment or its subclasses. BrowseFragment uses this interface to pass row based interaction events to the target fragment.

Summary

Constructors
publicMainFragmentRowsAdapter(Fragment fragment)

Methods
public RowPresenter.ViewHolderfindRowViewHolderByPosition(int position)

public final FragmentgetFragment()

public intgetSelectedPosition()

public voidsetAdapter(ObjectAdapter adapter)

Set the visibility titles/hover of browse rows.

public voidsetOnItemViewClickedListener(OnItemViewClickedListener listener)

Sets an item clicked listener on the fragment.

public voidsetOnItemViewSelectedListener(OnItemViewSelectedListener listener)

Sets an item selection listener.

public voidsetSelectedPosition(int rowPosition, boolean smooth)

Selects a Row.

public voidsetSelectedPosition(int rowPosition, boolean smooth, Presenter.ViewHolderTask rowHolderTask)

Selects a Row and perform an optional task on the Row.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public MainFragmentRowsAdapter(Fragment fragment)

Methods

public final Fragment getFragment()

public void setAdapter(ObjectAdapter adapter)

Set the visibility titles/hover of browse rows.

public void setOnItemViewClickedListener(OnItemViewClickedListener listener)

Sets an item clicked listener on the fragment.

public void setOnItemViewSelectedListener(OnItemViewSelectedListener listener)

Sets an item selection listener.

public void setSelectedPosition(int rowPosition, boolean smooth, Presenter.ViewHolderTask rowHolderTask)

Selects a Row and perform an optional task on the Row.

public void setSelectedPosition(int rowPosition, boolean smooth)

Selects a Row.

public int getSelectedPosition()

Returns:

The position of selected row.

public RowPresenter.ViewHolder findRowViewHolderByPosition(int position)

Parameters:

position: Position of Row.

Returns:

Row ViewHolder.