ColorContrastOptions
public
class
ColorContrastOptions
extends Object
java.lang.Object | |
↳ | com.google.android.material.color.ColorContrastOptions |
Wrapper class for specifying color contrast options when applying contrast to branded and custom themes. Clients have the options to provide theme overlay resource ids for medium and high contrast mode.
An example of the provided theme overlay resource ids could be one of the following:
- contrast in light mode: R.style.ThemeOverlay_XxxContrast_Light
- contrast in dark mode: R.style.ThemeOverlay_XxxContrast_Dark
- contrast in both light and dark mode: R.style.ThemeOverlay_XxxContrast_DayNight
Summary
Nested classes | |
---|---|
class |
ColorContrastOptions.Builder
Builder class for specifying options when applying contrast. |
Public methods | |
---|---|
int
|
getHighContrastThemeOverlay()
Returns the resource id of the high contrast theme overlay. |
int
|
getMediumContrastThemeOverlay()
Returns the resource id of the medium contrast theme overlay. |
Inherited methods | |
---|---|
Public methods
getHighContrastThemeOverlay
public int getHighContrastThemeOverlay ()
Returns the resource id of the high contrast theme overlay.
Returns | |
---|---|
int |
getMediumContrastThemeOverlay
public int getMediumContrastThemeOverlay ()
Returns the resource id of the medium contrast theme overlay.
Returns | |
---|---|
int |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-10-09 UTC.