Interface SurfaceTheme<T extends SurfaceTheme<T>>
- Type Parameters:
T
- The type of the dynamic theme.
- All Superinterfaces:
BaseTheme<T>
,ElevationTheme<T>
- All Known Subinterfaces:
DynamicColor<T>
- All Known Implementing Classes:
AppTheme
,AppWidgetTheme
An
ElevationTheme
to implement the surface theme.-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the surface color used by this theme.int
getSurfaceColor
(boolean resolve) Returns the surface color used by this theme.int
getSurfaceColor
(boolean resolve, boolean inverse) Returns the surface color used by this theme.int
Returns the surface tint color used by this theme.int
getTintSurfaceColor
(boolean resolve) Returns the surface tint color used by this theme.int
getTintSurfaceColor
(boolean resolve, boolean inverse) Returns the surface tint color used by this theme.boolean
Checks whether the background should be used as the surface.setSurfaceColor
(int surfaceColor) Set the surface color used by this theme.setSurfaceColor
(int surfaceColor, boolean generateTint) Set the surface color used by this theme.setTintSurfaceColor
(int tintSurfaceColor) Set the surface tint color used by this theme.Methods inherited from interface com.pranavpandey.android.dynamic.theme.base.BaseTheme
isHost, setHost
Methods inherited from interface com.pranavpandey.android.dynamic.theme.base.ElevationTheme
getElevation, getElevation, isElevation, setElevation
-
Method Details
-
getSurfaceColor
Returns the surface color used by this theme.- Parameters:
resolve
-true
to resolve the auto color.inverse
-true
to resolve the inverse color.- Returns:
- The surface color used by this theme.
-
getSurfaceColor
Returns the surface color used by this theme.- Parameters:
resolve
-true
to resolve the auto color.- Returns:
- The surface color used by this theme.
-
getSurfaceColor
Returns the surface color used by this theme.- Returns:
- The surface color used by this theme.
-
setSurfaceColor
Set the surface color used by this theme.- Parameters:
surfaceColor
- The surface color to be set.generateTint
-true
to automatically generate the tint color also.- Returns:
- The
SurfaceTheme
object to allow for chaining of calls to set methods. - See Also:
-
setSurfaceColor
Set the surface color used by this theme.It will automatically generate the tint color also.
- Parameters:
surfaceColor
- The surface color to be set.- Returns:
- The
SurfaceTheme
object to allow for chaining of calls to set methods. - See Also:
-
getTintSurfaceColor
Returns the surface tint color used by this theme.- Parameters:
resolve
-true
to resolve the auto color.inverse
-true
to resolve the inverse color.- Returns:
- The surface tint color used by this theme.
-
getTintSurfaceColor
Returns the surface tint color used by this theme.- Parameters:
resolve
-true
to resolve the auto color.- Returns:
- The surface tint color used by this theme.
-
getTintSurfaceColor
Returns the surface tint color used by this theme.- Returns:
- The surface tint color used by this theme.
-
setTintSurfaceColor
Set the surface tint color used by this theme.- Parameters:
tintSurfaceColor
- The surface tint color to be set.- Returns:
- The
SurfaceTheme
object to allow for chaining of calls to set methods.
-
isBackgroundSurface
boolean isBackgroundSurface()Checks whether the background should be used as the surface.- Returns:
true
if the background should be used as surface.
-