Class Defaults
java.lang.Object
com.pranavpandey.android.dynamic.support.Defaults
Default configurations used by the dynamic widgets.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final floatDefault alpha for the backdrop view.static final floatDefault alpha for the disabled state.static final floatDefault dim alpha for the disabled state.static final intDefault alpha for the disabled state in integer.static final floatDefault alpha for the toast.static final floatDefault alpha for the enabled state.static final intDefault alpha for the enabled state in integer.static final floatDefault alpha for the hint.static final floatDefault alpha for the pressed state.static final floatDefault alpha when the selector is pressed.static final floatDefault alpha for the scrim insets.static final floatDefault alpha value for the selected state to generate color state list dynamically.static final floatDefault alpha for the toast.static final floatDefault alpha value for the unselected state to generate color state list dynamically.static final floatDefault alpha for the unselected state.static final intDefault alpha for the unselected state in integer.static final booleanDeprecated.static final intDefault color type used by the chip widgets.static final intDefault color type for the divider.static final intDefault edge effect or glow color type used by the scrollable widgets.static final intDefault value for the error color type.static final intDefault icon color type used by the image widgets.static final intDefault color type used by the scrollable widgets.static final intDefault subheader color type used by the menu widgets.static final intDefault color type used by the system secondary widgets.static final intDefault color type used by the tooltip background.static final intDefault color type used by the tooltip tint.static final booleanDefault value to provide widget corner radius according to the dynamic theme.static final floatDefault factor to calculate the stroke width.static final floatDefault factor to generate the surface color.static final booleanDefault value to fill the empty icon space.static final booleanDefault value to for the floating view.static final booleanDefault value to force widget elevation.static final floatDefault inset for the slider hue drawable.static final floatDefault inset for the seek bar hue drawable.static final intConstant for the invalid or no position.static final booleanDefault value to provide the dynamic RTL support.static final floatDefault value to shift a dark color.static final floatDefault value to shift a light color.static final booleanDefault value to show a divider below the widgets.static final floatDefault dark state value for the box background.static final floatDefault light state value for the box background.static final floatDefault value to darken the color.static final floatDefault value to lighten the color.static final floatDefault value for the pressed state.static final booleanDefault borderless value for the widgets.static final booleanDefault borderless value for the group widgets.static final booleanDefault tint background value for the widgets.static final booleantrueto make apply window insets. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intReturns the default value for the background functionality used by the various widgets.static intgetContrastWithColor(Context context) Get the default contrast with color from the theme.
-
Field Details
-
ADS_NO_POSITION
public static final int ADS_NO_POSITIONConstant for the invalid or no position.- See Also:
-
ADS_ALPHA_DIVIDER
public static final float ADS_ALPHA_DIVIDERDefault alpha for the toast.- See Also:
-
ADS_ALPHA_TOAST
public static final float ADS_ALPHA_TOASTDefault alpha for the toast.- See Also:
-
ADS_ALPHA_ENABLED
public static final float ADS_ALPHA_ENABLEDDefault alpha for the enabled state.- See Also:
-
ADS_ALPHA_ENABLED_INTEGER
public static final int ADS_ALPHA_ENABLED_INTEGERDefault alpha for the enabled state in integer.- See Also:
-
ADS_ALPHA_HINT
public static final float ADS_ALPHA_HINTDefault alpha for the hint.- See Also:
-
ADS_ALPHA_UNSELECTED
public static final float ADS_ALPHA_UNSELECTEDDefault alpha for the unselected state.- See Also:
-
ADS_ALPHA_UNSELECTED_INTEGER
public static final int ADS_ALPHA_UNSELECTED_INTEGERDefault alpha for the unselected state in integer.- See Also:
-
ADS_ALPHA_UNCHECKED
public static final float ADS_ALPHA_UNCHECKEDDefault alpha value for the unselected state to generate color state list dynamically.- See Also:
-
ADS_ALPHA_SELECTED
public static final float ADS_ALPHA_SELECTEDDefault alpha value for the selected state to generate color state list dynamically.- See Also:
-
ADS_ALPHA_PRESSED
public static final float ADS_ALPHA_PRESSEDDefault alpha for the pressed state.- See Also:
-
ADS_ALPHA_PRESSED_SELECTOR
public static final float ADS_ALPHA_PRESSED_SELECTORDefault alpha when the selector is pressed.- See Also:
-
ADS_ALPHA_SCRIM
public static final float ADS_ALPHA_SCRIMDefault alpha for the scrim insets.- See Also:
-
ADS_ALPHA_BACKDROP
public static final float ADS_ALPHA_BACKDROPDefault alpha for the backdrop view.- See Also:
-
ADS_ALPHA_DISABLED
public static final float ADS_ALPHA_DISABLEDDefault alpha for the disabled state.- See Also:
-
ADS_ALPHA_DISABLED_INTEGER
public static final int ADS_ALPHA_DISABLED_INTEGERDefault alpha for the disabled state in integer.- See Also:
-
ADS_ALPHA_DISABLED_DIM
public static final float ADS_ALPHA_DISABLED_DIMDefault dim alpha for the disabled state.- See Also:
-
ADS_INSET_HUE
public static final float ADS_INSET_HUEDefault inset for the slider hue drawable.- See Also:
-
ADS_INSET_HUE_SMALL
public static final float ADS_INSET_HUE_SMALLDefault inset for the seek bar hue drawable.- See Also:
-
ADS_STATE_BOX_LIGHT
public static final float ADS_STATE_BOX_LIGHTDefault light state value for the box background.- See Also:
-
ADS_STATE_BOX_DARK
public static final float ADS_STATE_BOX_DARKDefault dark state value for the box background.- See Also:
-
ADS_STATE_LIGHT
public static final float ADS_STATE_LIGHTDefault value to lighten the color.- See Also:
-
ADS_STATE_DARK
public static final float ADS_STATE_DARKDefault value to darken the color.- See Also:
-
ADS_STATE_PRESSED
public static final float ADS_STATE_PRESSEDDefault value for the pressed state.- See Also:
-
ADS_SHIFT_LIGHT
public static final float ADS_SHIFT_LIGHTDefault value to shift a light color.- See Also:
-
ADS_SHIFT_DARK
public static final float ADS_SHIFT_DARKDefault value to shift a dark color.- See Also:
-
ADS_FACTOR_SURFACE
public static final float ADS_FACTOR_SURFACEDefault factor to generate the surface color.- See Also:
-
ADS_FACTOR_STROKE
public static final float ADS_FACTOR_STROKEDefault factor to calculate the stroke width.- See Also:
-
ADS_COLOR_TYPE_SYSTEM_SECONDARY
public static final int ADS_COLOR_TYPE_SYSTEM_SECONDARYDefault color type used by the system secondary widgets.- See Also:
-
ADS_COLOR_TYPE_ERROR
public static final int ADS_COLOR_TYPE_ERRORDefault value for the error color type.- See Also:
-
ADS_COLOR_TYPE_EDGE_EFFECT
public static final int ADS_COLOR_TYPE_EDGE_EFFECTDefault edge effect or glow color type used by the scrollable widgets.- See Also:
-
ADS_COLOR_TYPE_SCROLLABLE
public static final int ADS_COLOR_TYPE_SCROLLABLEDefault color type used by the scrollable widgets.- See Also:
-
ADS_COLOR_TYPE_SUB_HEADER
public static final int ADS_COLOR_TYPE_SUB_HEADERDefault subheader color type used by the menu widgets.- See Also:
-
ADS_COLOR_TYPE_ICON
public static final int ADS_COLOR_TYPE_ICONDefault icon color type used by the image widgets.- See Also:
-
ADS_COLOR_TYPE_TOOLTIP_BACKGROUND
public static final int ADS_COLOR_TYPE_TOOLTIP_BACKGROUNDDefault color type used by the tooltip background.- See Also:
-
ADS_COLOR_TYPE_TOOLTIP_TINT
public static final int ADS_COLOR_TYPE_TOOLTIP_TINTDefault color type used by the tooltip tint.- See Also:
-
ADS_COLOR_TYPE_CHIP
public static final int ADS_COLOR_TYPE_CHIPDefault color type used by the chip widgets.- See Also:
-
ADS_COLOR_TYPE_DIVIDER
public static final int ADS_COLOR_TYPE_DIVIDERDefault color type for the divider.- See Also:
-
ADS_BACKGROUND_AWARE
Deprecated.UsegetBackgroundAware()for updated compatibility.Default value to make widgets background aware so that they can change color according to the theme background to provide the best visibility.trueto make widgets background aware.- See Also:
-
ADS_DYNAMIC_CORNER_SIZE
public static final boolean ADS_DYNAMIC_CORNER_SIZEDefault value to provide widget corner radius according to the dynamic theme.trueto provide widget corner radius according to the dynamic theme.- See Also:
-
ADS_FORCE_ELEVATION
public static final boolean ADS_FORCE_ELEVATIONDefault value to force widget elevation.trueto force elevation for the widget.- See Also:
-
ADS_FLOATING_VIEW
public static final boolean ADS_FLOATING_VIEWDefault value to for the floating view.falseto disable the floating view.- See Also:
-
ADS_STYLE_BORDERLESS
public static final boolean ADS_STYLE_BORDERLESSDefault borderless value for the widgets.trueif the widget has borderless style.- See Also:
-
ADS_STYLE_BORDERLESS_GROUP
public static final boolean ADS_STYLE_BORDERLESS_GROUPDefault borderless value for the group widgets.trueif the widget has borderless style.- See Also:
-
ADS_TINT_BACKGROUND
public static final boolean ADS_TINT_BACKGROUNDDefault tint background value for the widgets.trueto enable the background tinting.- See Also:
-
ADS_SHOW_DIVIDER
public static final boolean ADS_SHOW_DIVIDERDefault value to show a divider below the widgets.trueto show the divider.- See Also:
-
ADS_FILL_SPACE
public static final boolean ADS_FILL_SPACEDefault value to fill the empty icon space.trueto fill the space.- See Also:
-
ADS_RTL_SUPPORT
public static final boolean ADS_RTL_SUPPORTDefault value to provide the dynamic RTL support.trueto provide the dynamic RTL support.- See Also:
-
ADS_WINDOW_INSETS
public static final boolean ADS_WINDOW_INSETStrueto make apply window insets.- See Also:
-
-
Constructor Details
-
Defaults
public Defaults()
-
-
Method Details
-
getBackgroundAware
public static int getBackgroundAware()Returns the default value for the background functionality used by the various widgets.- Returns:
- The default value for the background functionality used by the various widgets.
- See Also:
-
getContrastWithColor
Get the default contrast with color from the theme.Generally, it should be a background color so that widgets can change their color accordingly if they are background aware.
- Parameters:
context- The context to retrieve theme and resources.- Returns:
- The default contrast with color.
- See Also:
-
R.attr.adt_contrastWithDefault
-
getBackgroundAware()for updated compatibility.