Stay organized with collections
Save and categorize content based on your preferences.
HarmonizedColorsOptions.Builder
public
static
class
HarmonizedColorsOptions.Builder
extends Object
java.lang.Object
|
↳ |
com.google.android.material.color.HarmonizedColorsOptions.Builder
|
Builder class for specifying options when harmonizing colors.
Summary
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 constructors
Builder
public Builder ()
Public methods
setColorAttributeToHarmonizeWith
public HarmonizedColorsOptions.Builder setColorAttributeToHarmonizeWith (int colorAttributeToHarmonizeWith)
Sets the color attribute to harmonize with.
Parameters |
colorAttributeToHarmonizeWith |
int : The color attribute provided to harmonize color
resources and HarmonizedColorAttributes with.
|
setColorAttributes
public HarmonizedColorsOptions.Builder setColorAttributes (HarmonizedColorAttributes colorAttributes)
Sets the harmonized color attributes for harmonization.
This method will look up the color resource the attribute points to, and harmonizing the
color resource directly. If you are looking to harmonize only color resources, in most cases
when constructing HarmonizedColorsOptions
,
setColorResourceIds
public HarmonizedColorsOptions.Builder setColorResourceIds (int[] colorResourceIds)
Sets the array of color resource ids for harmonization.
Parameters |
colorResourceIds |
int : 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.Builder\n\nSummary: [Ctors](#pubctors) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nHarmonizedColorsOptions.Builder\n===============================\n\n\n`\npublic\nstatic\n\n\nclass\nHarmonizedColorsOptions.Builder\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.Builder |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nBuilder class for specifying options when harmonizing colors.\n\nSummary\n-------\n\n| ### Public constructors ||\n|-----------------------------------------------------------------------------------------------------------|---|\n| ` `[Builder](/reference/com/google/android/material/color/HarmonizedColorsOptions.Builder#Builder())`() ` |\n\n| ### Public methods ||\n|--------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` `[HarmonizedColorsOptions](/reference/com/google/android/material/color/HarmonizedColorsOptions) | ` `[build](/reference/com/google/android/material/color/HarmonizedColorsOptions.Builder#build())`() ` |\n| ` `[HarmonizedColorsOptions.Builder](/reference/com/google/android/material/color/HarmonizedColorsOptions.Builder) | ` `[setColorAttributeToHarmonizeWith](/reference/com/google/android/material/color/HarmonizedColorsOptions.Builder#setColorAttributeToHarmonizeWith(int))`(int colorAttributeToHarmonizeWith) ` Sets the color attribute to harmonize with. |\n| ` `[HarmonizedColorsOptions.Builder](/reference/com/google/android/material/color/HarmonizedColorsOptions.Builder) | ` `[setColorAttributes](/reference/com/google/android/material/color/HarmonizedColorsOptions.Builder#setColorAttributes(com.google.android.material.color.HarmonizedColorAttributes))`(`[HarmonizedColorAttributes](/reference/com/google/android/material/color/HarmonizedColorAttributes)` colorAttributes) ` Sets the harmonized color attributes for harmonization. |\n| ` `[HarmonizedColorsOptions.Builder](/reference/com/google/android/material/color/HarmonizedColorsOptions.Builder) | ` `[setColorResourceIds](/reference/com/google/android/material/color/HarmonizedColorsOptions.Builder#setColorResourceIds(int[]))`(int[] colorResourceIds) ` Sets the array of color resource ids for harmonization. |\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 constructors\n-------------------\n\n### Builder\n\n```\npublic Builder ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### build\n\n```\npublic HarmonizedColorsOptions build ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------------------------------------------------------------------------------------------------|--------|\n| [HarmonizedColorsOptions](/reference/com/google/android/material/color/HarmonizedColorsOptions) | \u003cbr /\u003e |\n\n### setColorAttributeToHarmonizeWith\n\n```\npublic HarmonizedColorsOptions.Builder setColorAttributeToHarmonizeWith (int colorAttributeToHarmonizeWith)\n```\n\nSets the color attribute to harmonize with.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `colorAttributeToHarmonizeWith` | `int`: The color attribute provided to harmonize color resources and [HarmonizedColorAttributes](/reference/com/google/android/material/color/HarmonizedColorAttributes) with. \u003cbr /\u003e |\n\n| Returns ||\n|-----------------------------------------------------------------------------------------------------------------|--------|\n| [HarmonizedColorsOptions.Builder](/reference/com/google/android/material/color/HarmonizedColorsOptions.Builder) | \u003cbr /\u003e |\n\n### setColorAttributes\n\n```\npublic HarmonizedColorsOptions.Builder setColorAttributes (HarmonizedColorAttributes colorAttributes)\n```\n\nSets the harmonized color attributes for harmonization.\n\nThis method will look up the color resource the attribute points to, and harmonizing the\ncolor resource directly. If you are looking to harmonize only color resources, in most cases\nwhen constructing [HarmonizedColorsOptions](/reference/com/google/android/material/color/HarmonizedColorsOptions),\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `colorAttributes` | `HarmonizedColorAttributes`: The [HarmonizedColorAttributes](/reference/com/google/android/material/color/HarmonizedColorAttributes) that needs to be harmonized. \u003cbr /\u003e |\n\n| Returns ||\n|-----------------------------------------------------------------------------------------------------------------|--------|\n| [HarmonizedColorsOptions.Builder](/reference/com/google/android/material/color/HarmonizedColorsOptions.Builder) | \u003cbr /\u003e |\n\n**See also:**\n\n- [should be enough.](/reference/com/google/android/material/color/HarmonizedColorsOptions.Builder#setColorResourceIds(int[])) \n\n### setColorResourceIds\n\n```\npublic HarmonizedColorsOptions.Builder setColorResourceIds (int[] colorResourceIds)\n```\n\nSets the array of color resource ids for harmonization.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------------------|----------------------------------------------------------------------------|\n| `colorResourceIds` | `int`: The array of color resource ids that needs to be harmonized. \u003cbr /\u003e |\n\n| Returns ||\n|-----------------------------------------------------------------------------------------------------------------|--------|\n| [HarmonizedColorsOptions.Builder](/reference/com/google/android/material/color/HarmonizedColorsOptions.Builder) | \u003cbr /\u003e |"]]