FileDocCategorySizeDatePackage
FocusHighlightHelper.javaAPI DocAndroid 5.1 API9604Thu Mar 12 22:22:56 GMT 2015android.support.v17.leanback.widget

FocusHighlightHelper

public class FocusHighlightHelper extends Object
Setup the behavior how to highlight when a item gains focus.

Fields Summary
Constructors Summary
Methods Summary
public static voidsetupBrowseItemFocusHighlight(ItemBridgeAdapter adapter, int zoomIndex, boolean useDimmer)
Setup the focus highlight behavior of a focused item in browse list row.

param
zoomIndex One of {@link FocusHighlight#ZOOM_FACTOR_SMALL} {@link FocusHighlight#ZOOM_FACTOR_MEDIUM} {@link FocusHighlight#ZOOM_FACTOR_LARGE} {@link FocusHighlight#ZOOM_FACTOR_NONE}.
param
useDimmer Allow dimming browse item when unselected.
param
adapter adapter of the list row.

        adapter.setFocusHighlight(new BrowseItemFocusHighlight(zoomIndex, useDimmer));
    
public static voidsetupHeaderItemFocusHighlight(VerticalGridView gridView)
Setup the focus highlight behavior of a focused item in header list.

param
gridView the header list.

        if (gridView.getAdapter() instanceof ItemBridgeAdapter) {
            ((ItemBridgeAdapter) gridView.getAdapter())
                    .setFocusHighlight(new HeaderItemFocusHighlight(gridView));
        }