Class AppTheme<T extends AppTheme<T>>
java.lang.Object
com.pranavpandey.android.dynamic.theme.AppTheme<T>
- Type Parameters:
T- The type of the dynamic theme.
- All Implemented Interfaces:
AccentTheme<T>,AutoTheme<T>,BackgroundAware<T>,BackgroundTheme<T>,BaseTheme<T>,CodeTheme<T>,CornerTheme<T>,DynamicColor<T>,ElevationTheme<T>,ErrorTheme<T>,FallbackTheme<T>,PrimaryTheme<T>,ResourceTheme<T>,StringTheme<T>,StrokeTheme<T>,StyleTheme<T>,SurfaceTheme<T>,TextTheme<T>,TranslucentTheme<T>,TypeTheme<T>
- Direct Known Subclasses:
AppWidgetTheme
public abstract class AppTheme<T extends AppTheme<T>>
extends Object
implements BaseTheme<T>, FallbackTheme<T>, ResourceTheme<T>, DynamicColor<T>, TextTheme<T>, AutoTheme<T>, CornerTheme<T>, BackgroundAware<T>, StrokeTheme<T>, TranslucentTheme<T>, StyleTheme<T>, TypeTheme<T>, StringTheme<T>, CodeTheme<T>
An abstract class to implement an app theme.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the color for the code background.floatReturns the code contrast ratio for by this theme.Returns the data for the theme code.intReturns the color for the code data.intReturns the color for the code finder.intReturns the color for the code overlay.intReturns the color for the code stroke.intReturns the style for the theme code.Returns the sharable data for the theme.booleanReturns whether to the dynamic colors are used by this theme.booleanisStroke()Returns whether the stroke is required for this theme.Converts this theme into its JSON equivalent.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.pranavpandey.android.dynamic.theme.base.AccentTheme
getAccentColor, getAccentColor, getAccentColor, getAccentColorDark, getAccentColorDark, getAccentColorDark, getTintAccentColor, getTintAccentColor, getTintAccentColor, getTintAccentColorDark, getTintAccentColorDark, getTintAccentColorDark, setAccentColor, setAccentColor, setAccentColorDark, setAccentColorDark, setTintAccentColor, setTintAccentColorDarkMethods inherited from interface com.pranavpandey.android.dynamic.theme.base.AutoTheme
autoGenerateColors, autoGenerateColorsMethods inherited from interface com.pranavpandey.android.dynamic.theme.base.BackgroundAware
getBackgroundAware, getBackgroundAware, getContrast, getContrast, getContrastRatio, isBackgroundAware, setBackgroundAware, setContrastMethods inherited from interface com.pranavpandey.android.dynamic.theme.base.BackgroundTheme
getBackgroundColor, getBackgroundColor, getBackgroundColor, getTintBackgroundColor, getTintBackgroundColor, getTintBackgroundColor, isDarkTheme, isInverseTheme, isShowDividers, setBackgroundColor, setBackgroundColor, setTintBackgroundColorMethods inherited from interface com.pranavpandey.android.dynamic.theme.base.BaseTheme
isHost, setHostMethods inherited from interface com.pranavpandey.android.dynamic.theme.base.CornerTheme
getCornerRadius, getCornerRadius, getCornerSize, getCornerSize, setCornerRadius, setCornerSizeMethods inherited from interface com.pranavpandey.android.dynamic.theme.base.DynamicColor
getDynamicColorsMethods inherited from interface com.pranavpandey.android.dynamic.theme.base.ElevationTheme
getElevation, getElevation, isElevation, setElevationMethods inherited from interface com.pranavpandey.android.dynamic.theme.base.ErrorTheme
getErrorColor, getErrorColor, getErrorColor, getTintErrorColor, getTintErrorColor, getTintErrorColor, setErrorColor, setErrorColor, setTintErrorColorMethods inherited from interface com.pranavpandey.android.dynamic.theme.base.FallbackTheme
getThemeFallbackMethods inherited from interface com.pranavpandey.android.dynamic.theme.base.PrimaryTheme
getPrimaryColor, getPrimaryColor, getPrimaryColor, getPrimaryColorDark, getPrimaryColorDark, getPrimaryColorDark, getTintPrimaryColor, getTintPrimaryColor, getTintPrimaryColor, getTintPrimaryColorDark, getTintPrimaryColorDark, getTintPrimaryColorDark, setPrimaryColor, setPrimaryColor, setPrimaryColorDark, setPrimaryColorDark, setTintPrimaryColor, setTintPrimaryColorDarkMethods inherited from interface com.pranavpandey.android.dynamic.theme.base.ResourceTheme
getThemeRes, setThemeResMethods inherited from interface com.pranavpandey.android.dynamic.theme.base.StringTheme
toDynamicString, toJsonStringMethods inherited from interface com.pranavpandey.android.dynamic.theme.base.StrokeTheme
getStrokeColorMethods inherited from interface com.pranavpandey.android.dynamic.theme.base.StyleTheme
getStyle, setStyleMethods inherited from interface com.pranavpandey.android.dynamic.theme.base.SurfaceTheme
getSurfaceColor, getSurfaceColor, getSurfaceColor, getTintSurfaceColor, getTintSurfaceColor, getTintSurfaceColor, isBackgroundSurface, setSurfaceColor, setSurfaceColor, setTintSurfaceColorMethods inherited from interface com.pranavpandey.android.dynamic.theme.base.TextTheme
getFontScale, getFontScale, getFontScaleRelative, getHighlightColor, getHighlightColor, getTextPrimaryColor, getTextPrimaryColor, getTextPrimaryColor, getTextPrimaryColorInverse, getTextPrimaryColorInverse, getTextPrimaryColorInverse, getTextSecondaryColor, getTextSecondaryColor, getTextSecondaryColor, getTextSecondaryColorInverse, getTextSecondaryColorInverse, getTextSecondaryColorInverse, isFontScale, setFontScale, setTextPrimaryColor, setTextPrimaryColor, setTextPrimaryColorInverse, setTextSecondaryColor, setTextSecondaryColor, setTextSecondaryColorInverseMethods inherited from interface com.pranavpandey.android.dynamic.theme.base.TranslucentTheme
getAlpha, getOpacity, getOpacity, isTranslucent, isTranslucentWindow, setOpacity
-
Constructor Details
-
AppTheme
public AppTheme()
-
-
Method Details
-
isDynamicColor
public boolean isDynamicColor()Description copied from interface:DynamicColorReturns whether to the dynamic colors are used by this theme.- Specified by:
isDynamicColorin interfaceDynamicColor<T extends AppTheme<T>>- Returns:
trueif the dynamic colors are used by this theme.
-
isStroke
public boolean isStroke()Description copied from interface:StrokeThemeReturns whether the stroke is required for this theme.- Specified by:
isStrokein interfaceStrokeTheme<T extends AppTheme<T>>- Returns:
trueif the stroke is required for this theme.
-
getThemeData
Description copied from interface:StringThemeReturns the sharable data for the theme.- Specified by:
getThemeDatain interfaceStringTheme<T extends AppTheme<T>>- Returns:
- The sharable data for the theme.
-
getCodeData
Description copied from interface:CodeThemeReturns the data for the theme code.- Specified by:
getCodeDatain interfaceCodeTheme<T extends AppTheme<T>>- Returns:
- The data for the theme code.
-
getCodeBackgroundColor
Description copied from interface:CodeThemeReturns the color for the code background.- Specified by:
getCodeBackgroundColorin interfaceCodeTheme<T extends AppTheme<T>>- Returns:
- The color for the code background.
-
getCodeStrokeColor
Description copied from interface:CodeThemeReturns the color for the code stroke.- Specified by:
getCodeStrokeColorin interfaceCodeTheme<T extends AppTheme<T>>- Returns:
- The color for the code stroke.
-
getCodeDataColor
Description copied from interface:CodeThemeReturns the color for the code data.- Specified by:
getCodeDataColorin interfaceCodeTheme<T extends AppTheme<T>>- Returns:
- The color for the code data.
-
getCodeFinderColor
Description copied from interface:CodeThemeReturns the color for the code finder.- Specified by:
getCodeFinderColorin interfaceCodeTheme<T extends AppTheme<T>>- Returns:
- The color for the finder data.
-
getCodeOverlayColor
Description copied from interface:CodeThemeReturns the color for the code overlay.- Specified by:
getCodeOverlayColorin interfaceCodeTheme<T extends AppTheme<T>>- Returns:
- The color for the code overlay.
-
getCodeContrastRatio
public float getCodeContrastRatio()Description copied from interface:CodeThemeReturns the code contrast ratio for by this theme.- Specified by:
getCodeContrastRatioin interfaceCodeTheme<T extends AppTheme<T>>- Returns:
- The code contrast ratio for by this theme.
-
getCodeStyle
public int getCodeStyle()Description copied from interface:CodeThemeReturns the style for the theme code.- Specified by:
getCodeStylein interfaceCodeTheme<T extends AppTheme<T>>- Returns:
- The style for the theme code.
-
toJsonString
Description copied from interface:StringThemeConverts this theme into its JSON equivalent.- Specified by:
toJsonStringin interfaceStringTheme<T extends AppTheme<T>>- Returns:
- The JSON equivalent of this theme.
-