Class Defaults
java.lang.Object
com.pranavpandey.android.dynamic.support.Defaults
Default configurations used by the dynamic widgets.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final float
Default alpha for the backdrop view.static final float
Default alpha for the disabled state.static final float
Default dim alpha for the disabled state.static final int
Default alpha for the disabled state in integer.static final float
Default alpha for the toast.static final float
Default alpha for the enabled state.static final int
Default alpha for the enabled state in integer.static final float
Default alpha for the hint.static final float
Default alpha for the pressed state.static final float
Default alpha when the selector is pressed.static final float
Default alpha for the scrim insets.static final float
Default alpha value for the selected state to generate color state list dynamically.static final float
Default alpha for the toast.static final float
Default alpha value for the unselected state to generate color state list dynamically.static final float
Default alpha for the unselected state.static final int
Default alpha for the unselected state in integer.static final boolean
Deprecated.static final int
Default color type used by the chip widgets.static final int
Default color type for the divider.static final int
Default edge effect or glow color type used by the scrollable widgets.static final int
Default value for the error color type.static final int
Default icon color type used by the image widgets.static final int
Default color type used by the scrollable widgets.static final int
Default subheader color type used by the menu widgets.static final int
Default color type used by the system secondary widgets.static final int
Default color type used by the tooltip background.static final int
Default color type used by the tooltip tint.static final boolean
Default value to provide widget corner radius according to the dynamic theme.static final float
Default factor to calculate the stroke width.static final float
Default factor to generate the surface color.static final boolean
Default value to fill the empty icon space.static final boolean
Default value to for the floating view.static final boolean
Default value to force widget elevation.static final float
Default inset for the slider hue drawable.static final float
Default inset for the seek bar hue drawable.static final int
Constant for the invalid or no position.static final boolean
Default value to provide the dynamic RTL support.static final float
Default value to shift a dark color.static final float
Default value to shift a light color.static final boolean
Default value to show a divider below the widgets.static final float
Default dark state value for the box background.static final float
Default light state value for the box background.static final float
Default value to darken the color.static final float
Default value to lighten the color.static final float
Default value for the pressed state.static final boolean
Default borderless value for the widgets.static final boolean
Default borderless value for the group widgets.static final boolean
Default tint background value for the widgets.static final boolean
true
to make apply window insets. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
Returns the default value for the background functionality used by the various widgets.static int
getContrastWithColor
(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.true
to 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.true
to 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.true
to force elevation for the widget.- See Also:
-
ADS_FLOATING_VIEW
public static final boolean ADS_FLOATING_VIEWDefault value to for the floating view.false
to disable the floating view.- See Also:
-
ADS_STYLE_BORDERLESS
public static final boolean ADS_STYLE_BORDERLESSDefault borderless value for the widgets.true
if 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.true
if the widget has borderless style.- See Also:
-
ADS_TINT_BACKGROUND
public static final boolean ADS_TINT_BACKGROUNDDefault tint background value for the widgets.true
to enable the background tinting.- See Also:
-
ADS_SHOW_DIVIDER
public static final boolean ADS_SHOW_DIVIDERDefault value to show a divider below the widgets.true
to show the divider.- See Also:
-
ADS_FILL_SPACE
public static final boolean ADS_FILL_SPACEDefault value to fill the empty icon space.true
to fill the space.- See Also:
-
ADS_RTL_SUPPORT
public static final boolean ADS_RTL_SUPPORTDefault value to provide the dynamic RTL support.true
to provide the dynamic RTL support.- See Also:
-
ADS_WINDOW_INSETS
public static final boolean ADS_WINDOW_INSETStrue
to 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.