HarmonizedColorsOptions
public
class
HarmonizedColorsOptions
extends Object
java.lang.Object
|
↳ |
com.google.android.material.color.HarmonizedColorsOptions
|
Wrapper class for specifying harmonization options, whether to harmonize an array of color
resources, or a HarmonizedColorAttributes
, along with the color attribute provided to
harmonize with.
Summary
Nested classes |
class |
HarmonizedColorsOptions.Builder
Builder class for specifying options when harmonizing colors.
|
Inherited methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public methods
createMaterialDefaults
public static HarmonizedColorsOptions createMaterialDefaults ()
Create HarmonizedColorsOptions with Material default, with Error colors being harmonized with
Primary.
getColorAttributeToHarmonizeWith
public int getColorAttributeToHarmonizeWith ()
Returns the color attribute to harmonize color resources and HarmonizedColorAttributes
with.
getColorResourceIds
public int[] getColorResourceIds ()
Returns the array of color resource ids that needs to be harmonized.
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 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# HarmonizedColorsOptions\n\nSummary: [Nested Classes](#nestedclasses) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nHarmonizedColorsOptions\n=======================\n\n\n`\npublic\n\n\nclass\nHarmonizedColorsOptions\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\n`\n\n|---|-----------------------------------------------------------|\n| java.lang.Object ||\n| ↳ | com.google.android.material.color.HarmonizedColorsOptions |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nWrapper class for specifying harmonization options, whether to harmonize an array of color\nresources, or a [HarmonizedColorAttributes](/reference/com/google/android/material/color/HarmonizedColorAttributes), along with the color attribute provided to\nharmonize with.\n\nSummary\n-------\n\n| ### Nested classes ||\n|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` class` | [HarmonizedColorsOptions.Builder](/reference/com/google/android/material/color/HarmonizedColorsOptions.Builder) Builder class for specifying options when harmonizing colors. |\n\n| ### Public methods ||\n|-----------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` static `[HarmonizedColorsOptions](/reference/com/google/android/material/color/HarmonizedColorsOptions) | ` `[createMaterialDefaults](/reference/com/google/android/material/color/HarmonizedColorsOptions#createMaterialDefaults())`() ` Create HarmonizedColorsOptions with Material default, with Error colors being harmonized with Primary. |\n| ` int` | ` `[getColorAttributeToHarmonizeWith](/reference/com/google/android/material/color/HarmonizedColorsOptions#getColorAttributeToHarmonizeWith())`() ` Returns the color attribute to harmonize color resources and [HarmonizedColorAttributes](/reference/com/google/android/material/color/HarmonizedColorAttributes) with. |\n| ` `[HarmonizedColorAttributes](/reference/com/google/android/material/color/HarmonizedColorAttributes) | ` `[getColorAttributes](/reference/com/google/android/material/color/HarmonizedColorsOptions#getColorAttributes())`() ` Returns the [HarmonizedColorAttributes](/reference/com/google/android/material/color/HarmonizedColorAttributes) that needs to be harmonized. |\n| ` int[]` | ` `[getColorResourceIds](/reference/com/google/android/material/color/HarmonizedColorsOptions#getColorResourceIds())`() ` Returns the array of color resource ids that needs to be harmonized. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` java.lang.Object ` |-------------------|-------------------------------| | ` Object` | ` clone() ` | | ` boolean` | ` equals(Object arg0) ` | | ` void` | ` finalize() ` | | ` final Class\u003c?\u003e` | ` getClass() ` | | ` int` | ` hashCode() ` | | ` final void` | ` notify() ` | | ` final void` | ` notifyAll() ` | | ` String` | ` toString() ` | | ` final void` | ` wait(long arg0, int arg1) ` | | ` final void` | ` wait(long arg0) ` | | ` final void` | ` wait() ` | ||\n\nPublic methods\n--------------\n\n### createMaterialDefaults\n\n```\npublic static HarmonizedColorsOptions createMaterialDefaults ()\n```\n\nCreate HarmonizedColorsOptions with Material default, with Error colors being harmonized with\nPrimary.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------------------------------------------------------------------------------------------------|--------|\n| [HarmonizedColorsOptions](/reference/com/google/android/material/color/HarmonizedColorsOptions) | \u003cbr /\u003e |\n\n### getColorAttributeToHarmonizeWith\n\n```\npublic int getColorAttributeToHarmonizeWith ()\n```\n\nReturns the color attribute to harmonize color resources and [HarmonizedColorAttributes](/reference/com/google/android/material/color/HarmonizedColorAttributes)\nwith.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|--------|\n| `int` | \u003cbr /\u003e |\n\n### getColorAttributes\n\n```\npublic HarmonizedColorAttributes getColorAttributes ()\n```\n\nReturns the [HarmonizedColorAttributes](/reference/com/google/android/material/color/HarmonizedColorAttributes) that needs to be harmonized.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-----------------------------------------------------------------------------------------------------|--------|\n| [HarmonizedColorAttributes](/reference/com/google/android/material/color/HarmonizedColorAttributes) | \u003cbr /\u003e |\n\n### getColorResourceIds\n\n```\npublic int[] getColorResourceIds ()\n```\n\nReturns the array of color resource ids that needs to be harmonized.\n\n\u003cbr /\u003e\n\n| Returns ||\n|---------|--------|\n| `int[]` | \u003cbr /\u003e |"]]