FocusHighlightHelper

public class FocusHighlightHelper


Sets up the highlighting behavior when an item gains focus.

Summary

Public constructors

This method is deprecated.

This type should not be instantiated as it contains only static methods.

Public methods

static void
setupBrowseItemFocusHighlight(
    ItemBridgeAdapter adapter,
    int zoomIndex,
    boolean useDimmer
)

Sets up the focus highlight behavior of a focused item in browse list row.

static void

Sets up default focus highlight behavior of a focused item in header list.

static void

This method is deprecated.

Use setupHeaderItemFocusHighlight

static void
setupHeaderItemFocusHighlight(
    ItemBridgeAdapter adapter,
    boolean scaleEnabled
)

Sets up the focus highlight behavior of a focused item in header list.

static void
setupHeaderItemFocusHighlight(
    VerticalGridView gridView,
    boolean scaleEnabled
)

This method is deprecated.

Use setupHeaderItemFocusHighlight

Public constructors

FocusHighlightHelper

Added in 1.1.0
Deprecated in 1.1.0
public FocusHighlightHelper()

Public methods

setupBrowseItemFocusHighlight

Added in 1.1.0
public static void setupBrowseItemFocusHighlight(
    ItemBridgeAdapter adapter,
    int zoomIndex,
    boolean useDimmer
)

Sets up the focus highlight behavior of a focused item in browse list row. App usually does not call this method, it uses ListRowPresenter.

Parameters
ItemBridgeAdapter adapter

adapter of the list row.

int zoomIndex

One of ZOOM_FACTOR_SMALLZOOM_FACTOR_XSMALLZOOM_FACTOR_MEDIUMZOOM_FACTOR_LARGEZOOM_FACTOR_NONE.

boolean useDimmer

Allow dimming browse item when unselected.

setupHeaderItemFocusHighlight

Added in 1.1.0
public static void setupHeaderItemFocusHighlight(ItemBridgeAdapter adapter)

Sets up default focus highlight behavior of a focused item in header list. It would scale the focused item and update onSelectLevelChanged. Equivalent to call setupHeaderItemFocusHighlight(itemBridgeAdapter, true).

Parameters
ItemBridgeAdapter adapter

The adapter of HeadersFragment.

See also
getBridgeAdapter

setupHeaderItemFocusHighlight

Added in 1.1.0
Deprecated in 1.1.0
public static void setupHeaderItemFocusHighlight(VerticalGridView gridView)

Sets up default focus highlight behavior of a focused item in header list. It would scale the focused item and update onSelectLevelChanged. Equivalent to call setupHeaderItemFocusHighlight(gridView, true).

Parameters
VerticalGridView gridView

The header list.

setupHeaderItemFocusHighlight

Added in 1.1.0
public static void setupHeaderItemFocusHighlight(
    ItemBridgeAdapter adapter,
    boolean scaleEnabled
)

Sets up the focus highlight behavior of a focused item in header list.

Parameters
ItemBridgeAdapter adapter

The adapter of HeadersFragment.

boolean scaleEnabled

True if scale the item when focused, false otherwise. Note that onSelectLevelChanged will always be called regardless value of scaleEnabled.

See also
getBridgeAdapter

setupHeaderItemFocusHighlight

Added in 1.1.0
Deprecated in 1.1.0
public static void setupHeaderItemFocusHighlight(
    VerticalGridView gridView,
    boolean scaleEnabled
)

Sets up the focus highlight behavior of a focused item in header list.

Parameters
VerticalGridView gridView

The header list.

boolean scaleEnabled

True if scale the item when focused, false otherwise. Note that onSelectLevelChanged will always be called regardless value of scaleEnabled.