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 TypeMethodDescriptionintReturns the surface color used by this theme.intgetSurfaceColor(boolean resolve) Returns the surface color used by this theme.intgetSurfaceColor(boolean resolve, boolean inverse) Returns the surface color used by this theme.intReturns the surface tint color used by this theme.intgetTintSurfaceColor(boolean resolve) Returns the surface tint color used by this theme.intgetTintSurfaceColor(boolean resolve, boolean inverse) Returns the surface tint color used by this theme.booleanChecks 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, setHostMethods 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-trueto resolve the auto color.inverse-trueto resolve the inverse color.- Returns:
- The surface color used by this theme.
-
getSurfaceColor
Returns the surface color used by this theme.- Parameters:
resolve-trueto 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-trueto automatically generate the tint color also.- Returns:
- The
SurfaceThemeobject 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
SurfaceThemeobject to allow for chaining of calls to set methods. - See Also:
-
getTintSurfaceColor
Returns the surface tint color used by this theme.- Parameters:
resolve-trueto resolve the auto color.inverse-trueto 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-trueto 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
SurfaceThemeobject to allow for chaining of calls to set methods.
-
isBackgroundSurface
boolean isBackgroundSurface()Checks whether the background should be used as the surface.- Returns:
trueif the background should be used as surface.
-