Most visited

Recently visited

ShadowOverlayHelper.Builder

public static final class ShadowOverlayHelper.Builder
extends Object

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


用于创建ShadowOverlayHelper的创建器。

Summary

Public constructors

ShadowOverlayHelper.Builder()

Public methods

ShadowOverlayHelper build(Context context)

创建ShadowOverlayHelper对象

ShadowOverlayHelper.Builder keepForegroundDrawable(boolean keepForegroundDrawable)

如果不使用前景可绘制的覆盖色设置。

ShadowOverlayHelper.Builder needsOverlay(boolean needsOverlay)

设置是否需要叠加颜色。

ShadowOverlayHelper.Builder needsRoundedCorner(boolean needsRoundedCorner)

设置是否需要圆角。

ShadowOverlayHelper.Builder needsShadow(boolean needsShadow)

设置是否需要阴影。

ShadowOverlayHelper.Builder options(ShadowOverlayHelper.Options options)

设置选项值,例如

ShadowOverlayHelper.Builder preferZOrder(boolean preferZOrder)

设置是否喜欢z顺序阴影。

Inherited methods

From class java.lang.Object

Public constructors

ShadowOverlayHelper.Builder

ShadowOverlayHelper.Builder ()

Public methods

build

ShadowOverlayHelper build (Context context)

创建ShadowOverlayHelper对象

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

keepForegroundDrawable

ShadowOverlayHelper.Builder keepForegroundDrawable (boolean keepForegroundDrawable)

如果不使用前景可绘制的覆盖色设置。 例如,如果视图已经为其他目的指定了可绘制的前景。 如果属实,帮助者将使用ShadowOverlayContainer进行叠加颜色。

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

needsOverlay

ShadowOverlayHelper.Builder needsOverlay (boolean needsOverlay)

设置是否需要叠加颜色。

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

needsRoundedCorner

ShadowOverlayHelper.Builder needsRoundedCorner (boolean needsRoundedCorner)

设置是否需要圆角。

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

needsShadow

ShadowOverlayHelper.Builder needsShadow (boolean needsShadow)

设置是否需要阴影。

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

options

ShadowOverlayHelper.Builder options (ShadowOverlayHelper.Options options)

设置选项值,例如阴影Z值,圆角半径。

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

preferZOrder

ShadowOverlayHelper.Builder preferZOrder (boolean preferZOrder)

设置是否喜欢z顺序阴影。 在旧设备上,z顺序阴影可能会很慢,设置为false会回落到静态9贴片阴影。 建议从系统宽度读取设置值:请参阅Settings

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

Hooray!