added in version 1.0.0
belongs to Maven artifact androidx.leanback:leanback:1.0.0
Deprecated since version 1.0.0

BrowseFragment.MainFragmentRowsAdapter

public static class BrowseFragment.MainFragmentRowsAdapter
extends Object

java.lang.Object
   ↳ androidx.leanback.app.BrowseFragment.MainFragmentRowsAdapter<T extends android.app.Fragment>


This class was deprecated in API level 1.0.0.
use BrowseSupportFragment

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

Public constructors

BrowseFragment.MainFragmentRowsAdapter(T fragment)

Public methods

RowPresenter.ViewHolder findRowViewHolderByPosition(int position)
final T getFragment()
int getSelectedPosition()
void setAdapter(ObjectAdapter adapter)

Set the visibility titles/hover of browse rows.

void setOnItemViewClickedListener(OnItemViewClickedListener listener)

Sets an item clicked listener on the fragment.

void setOnItemViewSelectedListener(OnItemViewSelectedListener listener)

Sets an item selection listener.

void setSelectedPosition(int rowPosition, boolean smooth)

Selects a Row.

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

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

Inherited methods

Public constructors

BrowseFragment.MainFragmentRowsAdapter

added in version 1.0.0
public BrowseFragment.MainFragmentRowsAdapter (T fragment)

Parameters
fragment T

Public methods

findRowViewHolderByPosition

added in version 1.0.0
public RowPresenter.ViewHolder findRowViewHolderByPosition (int position)

Parameters
position int: Position of Row.

Returns
RowPresenter.ViewHolder Row ViewHolder.

getFragment

added in version 1.0.0
public final T getFragment ()

Returns
T

getSelectedPosition

added in version 1.0.0
public int getSelectedPosition ()

Returns
int The position of selected row.

setAdapter

added in version 1.0.0
public void setAdapter (ObjectAdapter adapter)

Set the visibility titles/hover of browse rows.

Parameters
adapter ObjectAdapter

setOnItemViewClickedListener

added in version 1.0.0
public void setOnItemViewClickedListener (OnItemViewClickedListener listener)

Sets an item clicked listener on the fragment.

Parameters
listener OnItemViewClickedListener

setOnItemViewSelectedListener

added in version 1.0.0
public void setOnItemViewSelectedListener (OnItemViewSelectedListener listener)

Sets an item selection listener.

Parameters
listener OnItemViewSelectedListener

setSelectedPosition

added in version 1.0.0
public void setSelectedPosition (int rowPosition, 
                boolean smooth)

Selects a Row.

Parameters
rowPosition int

smooth boolean

setSelectedPosition

added in version 1.0.0
public void setSelectedPosition (int rowPosition, 
                boolean smooth, 
                Presenter.ViewHolderTask rowHolderTask)

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

Parameters
rowPosition int

smooth boolean

rowHolderTask Presenter.ViewHolderTask