java.lang.Object
com.pranavpandey.android.dynamic.support.Defaults

public class Defaults extends Object
Default configurations used by the dynamic widgets.
  • Field Details

    • ADS_NO_POSITION

      public static final int ADS_NO_POSITION
      Constant for the invalid or no position.
      See Also:
    • ADS_ALPHA_DIVIDER

      public static final float ADS_ALPHA_DIVIDER
      Default alpha for the toast.
      See Also:
    • ADS_ALPHA_TOAST

      public static final float ADS_ALPHA_TOAST
      Default alpha for the toast.
      See Also:
    • ADS_ALPHA_ENABLED

      public static final float ADS_ALPHA_ENABLED
      Default alpha for the enabled state.
      See Also:
    • ADS_ALPHA_ENABLED_INTEGER

      public static final int ADS_ALPHA_ENABLED_INTEGER
      Default alpha for the enabled state in integer.
      See Also:
    • ADS_ALPHA_HINT

      public static final float ADS_ALPHA_HINT
      Default alpha for the hint.
      See Also:
    • ADS_ALPHA_UNSELECTED

      public static final float ADS_ALPHA_UNSELECTED
      Default alpha for the unselected state.
      See Also:
    • ADS_ALPHA_UNSELECTED_INTEGER

      public static final int ADS_ALPHA_UNSELECTED_INTEGER
      Default alpha for the unselected state in integer.
      See Also:
    • ADS_ALPHA_UNCHECKED

      public static final float ADS_ALPHA_UNCHECKED
      Default alpha value for the unselected state to generate color state list dynamically.
      See Also:
    • ADS_ALPHA_SELECTED

      public static final float ADS_ALPHA_SELECTED
      Default alpha value for the selected state to generate color state list dynamically.
      See Also:
    • ADS_ALPHA_PRESSED

      public static final float ADS_ALPHA_PRESSED
      Default alpha for the pressed state.
      See Also:
    • ADS_ALPHA_PRESSED_SELECTOR

      public static final float ADS_ALPHA_PRESSED_SELECTOR
      Default alpha when the selector is pressed.
      See Also:
    • ADS_ALPHA_SCRIM

      public static final float ADS_ALPHA_SCRIM
      Default alpha for the scrim insets.
      See Also:
    • ADS_ALPHA_BACKDROP

      public static final float ADS_ALPHA_BACKDROP
      Default alpha for the backdrop view.
      See Also:
    • ADS_ALPHA_DISABLED

      public static final float ADS_ALPHA_DISABLED
      Default alpha for the disabled state.
      See Also:
    • ADS_ALPHA_DISABLED_INTEGER

      public static final int ADS_ALPHA_DISABLED_INTEGER
      Default alpha for the disabled state in integer.
      See Also:
    • ADS_ALPHA_DISABLED_DIM

      public static final float ADS_ALPHA_DISABLED_DIM
      Default dim alpha for the disabled state.
      See Also:
    • ADS_INSET_HUE

      public static final float ADS_INSET_HUE
      Default inset for the slider hue drawable.
      See Also:
    • ADS_INSET_HUE_SMALL

      public static final float ADS_INSET_HUE_SMALL
      Default inset for the seek bar hue drawable.
      See Also:
    • ADS_STATE_BOX_LIGHT

      public static final float ADS_STATE_BOX_LIGHT
      Default light state value for the box background.
      See Also:
    • ADS_STATE_BOX_DARK

      public static final float ADS_STATE_BOX_DARK
      Default dark state value for the box background.
      See Also:
    • ADS_STATE_LIGHT

      public static final float ADS_STATE_LIGHT
      Default value to lighten the color.
      See Also:
    • ADS_STATE_DARK

      public static final float ADS_STATE_DARK
      Default value to darken the color.
      See Also:
    • ADS_STATE_PRESSED

      public static final float ADS_STATE_PRESSED
      Default value for the pressed state.
      See Also:
    • ADS_SHIFT_LIGHT

      public static final float ADS_SHIFT_LIGHT
      Default value to shift a light color.
      See Also:
    • ADS_SHIFT_DARK

      public static final float ADS_SHIFT_DARK
      Default value to shift a dark color.
      See Also:
    • ADS_FACTOR_SURFACE

      public static final float ADS_FACTOR_SURFACE
      Default factor to generate the surface color.
      See Also:
    • ADS_FACTOR_STROKE

      public static final float ADS_FACTOR_STROKE
      Default factor to calculate the stroke width.
      See Also:
    • ADS_COLOR_TYPE_SYSTEM_SECONDARY

      public static final int ADS_COLOR_TYPE_SYSTEM_SECONDARY
      Default color type used by the system secondary widgets.
      See Also:
    • ADS_COLOR_TYPE_ERROR

      public static final int ADS_COLOR_TYPE_ERROR
      Default value for the error color type.
      See Also:
    • ADS_COLOR_TYPE_EDGE_EFFECT

      public static final int ADS_COLOR_TYPE_EDGE_EFFECT
      Default edge effect or glow color type used by the scrollable widgets.
      See Also:
    • ADS_COLOR_TYPE_SCROLLABLE

      public static final int ADS_COLOR_TYPE_SCROLLABLE
      Default color type used by the scrollable widgets.
      See Also:
    • ADS_COLOR_TYPE_SUB_HEADER

      public static final int ADS_COLOR_TYPE_SUB_HEADER
      Default subheader color type used by the menu widgets.
      See Also:
    • ADS_COLOR_TYPE_ICON

      public static final int ADS_COLOR_TYPE_ICON
      Default icon color type used by the image widgets.
      See Also:
    • ADS_COLOR_TYPE_TOOLTIP_BACKGROUND

      public static final int ADS_COLOR_TYPE_TOOLTIP_BACKGROUND
      Default color type used by the tooltip background.
      See Also:
    • ADS_COLOR_TYPE_TOOLTIP_TINT

      public static final int ADS_COLOR_TYPE_TOOLTIP_TINT
      Default color type used by the tooltip tint.
      See Also:
    • ADS_COLOR_TYPE_CHIP

      public static final int ADS_COLOR_TYPE_CHIP
      Default color type used by the chip widgets.
      See Also:
    • ADS_COLOR_TYPE_DIVIDER

      public static final int ADS_COLOR_TYPE_DIVIDER
      Default color type for the divider.
      See Also:
    • ADS_BACKGROUND_AWARE

      @Deprecated public static final boolean ADS_BACKGROUND_AWARE
      Deprecated.
      Use getBackgroundAware() 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_SIZE
      Default 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_ELEVATION
      Default value to force widget elevation.

      true to force elevation for the widget.

      See Also:
    • ADS_FLOATING_VIEW

      public static final boolean ADS_FLOATING_VIEW
      Default value to for the floating view.

      false to disable the floating view.

      See Also:
    • ADS_STYLE_BORDERLESS

      public static final boolean ADS_STYLE_BORDERLESS
      Default 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_GROUP
      Default borderless value for the group widgets.

      true if the widget has borderless style.

      See Also:
    • ADS_TINT_BACKGROUND

      public static final boolean ADS_TINT_BACKGROUND
      Default tint background value for the widgets.

      true to enable the background tinting.

      See Also:
    • ADS_SHOW_DIVIDER

      public static final boolean ADS_SHOW_DIVIDER
      Default value to show a divider below the widgets.

      true to show the divider.

      See Also:
    • ADS_FILL_SPACE

      public static final boolean ADS_FILL_SPACE
      Default value to fill the empty icon space.

      true to fill the space.

      See Also:
    • ADS_RTL_SUPPORT

      public static final boolean ADS_RTL_SUPPORT
      Default 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_INSETS
      true 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

      @ColorInt public static int getContrastWithColor(@NonNull Context context)
      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