Most visited

Recently visited

ShadowOverlayHelper.Builder

public static final class ShadowOverlayHelper.Builder
extends Object

java.lang.Object
   ↳ android.support.v17.leanback.widget.ShadowOverlayHelper.Builder


Builder for creating ShadowOverlayHelper.

Summary

Public constructors

ShadowOverlayHelper.Builder()

Public methods

ShadowOverlayHelper build(Context context)

Create ShadowOverlayHelper object

ShadowOverlayHelper.Builder keepForegroundDrawable(boolean keepForegroundDrawable)

Set if not using foreground drawable for overlay color.

ShadowOverlayHelper.Builder needsOverlay(boolean needsOverlay)

Set if needs overlay color.

ShadowOverlayHelper.Builder needsRoundedCorner(boolean needsRoundedCorner)

Set if needs rounded corner.

ShadowOverlayHelper.Builder needsShadow(boolean needsShadow)

Set if needs shadow.

ShadowOverlayHelper.Builder options(ShadowOverlayHelper.Options options)

Set option values e.g.

ShadowOverlayHelper.Builder preferZOrder(boolean preferZOrder)

Set if prefer z-order shadow.

Inherited methods

From class java.lang.Object

Public constructors

ShadowOverlayHelper.Builder

ShadowOverlayHelper.Builder ()

Public methods

build

ShadowOverlayHelper build (Context context)

Create ShadowOverlayHelper object

Parameters
context Context: The context uses to read Resources settings.
Returns
ShadowOverlayHelper The ShadowOverlayHelper object.

keepForegroundDrawable

ShadowOverlayHelper.Builder keepForegroundDrawable (boolean keepForegroundDrawable)

Set if not using foreground drawable for overlay color. For example if the view has already assigned a foreground drawable for other purposes. When it's true, helper will use a ShadowOverlayContainer for overlay color.

Parameters
keepForegroundDrawable boolean: True to keep the original foreground drawable.
Returns
ShadowOverlayHelper.Builder The Builder object itself.

needsOverlay

ShadowOverlayHelper.Builder needsOverlay (boolean needsOverlay)

Set if needs overlay color.

Parameters
needsOverlay boolean: True if needs overlay.
Returns
ShadowOverlayHelper.Builder The Builder object itself.

needsRoundedCorner

ShadowOverlayHelper.Builder needsRoundedCorner (boolean needsRoundedCorner)

Set if needs rounded corner.

Parameters
needsRoundedCorner boolean: True if needs rounded corner.
Returns
ShadowOverlayHelper.Builder The Builder object itself.

needsShadow

ShadowOverlayHelper.Builder needsShadow (boolean needsShadow)

Set if needs shadow.

Parameters
needsShadow boolean: True if needs shadow.
Returns
ShadowOverlayHelper.Builder The Builder object itself.

options

ShadowOverlayHelper.Builder options (ShadowOverlayHelper.Options options)

Set option values e.g. Shadow Z value, rounded corner radius.

Parameters
options ShadowOverlayHelper.Options: The Options object to create ShadowOverlayHelper.
Returns
ShadowOverlayHelper.Builder

preferZOrder

ShadowOverlayHelper.Builder preferZOrder (boolean preferZOrder)

Set if prefer z-order shadow. On old devices, z-order shadow might be slow, set to false to fall back to static 9-patch shadow. Recommend to read from system wide Setting value: see Settings.

Parameters
preferZOrder boolean: True if prefer Z shadow. Default is true.
Returns
ShadowOverlayHelper.Builder The Builder object itself.

Hooray!