public class

BrowseSupportFragment.MainFragmentRowsAdapter<T extends Fragment>

extends java.lang.Object

 java.lang.Object

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

Subclasses:

RowsSupportFragment.MainFragmentRowsAdapter

Overview

This is used to pass information to RowsSupportFragment or its subclasses. BrowseSupportFragment 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.