You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* This function is equivalent to [isSystemInDarkTheme] except it takes the OUDS theme setting into account instead of the system one.
220
+
* Determines if the OUDS theme is currently in dark mode.
221
+
*
222
+
* This function is equivalent to [isSystemInDarkTheme], but it respects overrides applied by [OudsThemeTweak].
223
+
*
224
+
* The OUDS theme can be inverted or forced to light/dark modes using [OudsThemeTweak].
225
+
* The value returned by this function reflects these effective changes.
214
226
*
215
-
* The OUDS theme can be inverted or forced to light or dark when calling [OudsThemeTweak] and the value returned by this method reflects that kind of change.
216
-
* If there is no call to [OudsThemeTweak] anywhere in the layout hierarchy, then this function returns the same value as [isSystemInDarkTheme].
227
+
* If [OudsThemeTweak] is not used in the layout hierarchy, this function returns the same value as [isSystemInDarkTheme].
217
228
*
218
-
* @return `true` if OUDS is considered to be in 'dark theme'.
229
+
* @return `true` if the effective OUDS theme is dark, `false` otherwise.
* Any values that are not set will inherit the Orange theme.
32
+
* Implementations of this interface define the look and feel of the application by providing specific token values
33
+
* (colors, typography, spacing, etc.). Any values not explicitly set will generally rely on abstract definitions,
34
+
* but typical implementations should provide full sets of tokens.
33
35
*/
34
36
interfaceOudsThemeContract : Parcelable {
35
37
36
38
/**
37
-
* The theme display name.
39
+
* The display name of the theme (e.g., "Orange", "Sosh").
38
40
*/
39
41
val name:String
40
42
41
43
/**
42
-
* The theme settings.
44
+
* The general settings for the theme configuration.
43
45
*/
44
46
val settings:OudsThemeSettings
45
47
46
48
/**
47
-
* Color semantic tokens values used in the theme.
49
+
* The collection of semantic color tokens used in the theme.
48
50
*/
49
51
val colorTokens:OudsColorSemanticTokens
50
52
51
53
/**
52
-
* Material color matching used in the theme.
54
+
* The mapping of OUDS tokens to standard Material 3 color roles.
55
+
* This ensures compatibility with standard Material components.
53
56
*/
54
57
val materialColorTokens:OudsMaterialColorTokens
55
58
56
59
/**
57
-
* Border semantic tokens values used in the theme.
60
+
* The collection of border-related tokens (width, radius, style) used in the theme.
58
61
*/
59
62
val borderTokens:OudsBorderSemanticTokens
60
63
61
64
/**
62
-
* Effect semantic tokens values used in the theme.
65
+
* The collection of visual effect tokens (e.g., blurs) used in the theme.
63
66
*/
64
67
val effectTokens:OudsEffectSemanticTokens
65
68
66
69
/**
67
-
* Elevation semantic tokens values used in the theme.
70
+
* The collection of elevation tokens (z-index, shadows) used in the theme.
68
71
*/
69
72
val elevationTokens:OudsElevationSemanticTokens
70
73
71
74
/**
72
-
* Font family used in the theme.
73
-
* You can provide your own theme font family `FontFamily(Font(R.font.my_theme_font))`.
75
+
* The primary font family used in the theme.
76
+
*
77
+
* Defaults to [FontFamily.Default] (system font).
78
+
* You can provide a custom font family, for example: `FontFamily(Font(R.font.my_custom_font))`.
74
79
*/
75
80
val fontFamily:FontFamily
76
81
get() =FontFamily.Default
77
82
78
83
/**
79
-
* Font semantic tokens values used in the theme.
84
+
* The collection of typography semantic tokens (font sizes, weights, line heights) used in the theme.
80
85
*/
81
86
val fontTokens:OudsFontSemanticTokens
82
87
83
88
/**
84
-
* Grid semantic tokens values used in the theme.
89
+
* The collection of grid layout tokens used in the theme.
85
90
*/
86
91
val gridTokens:OudsGridSemanticTokens
87
92
88
93
/**
89
-
* Opacity semantic tokens values used in the theme.
94
+
* The collection of opacity tokens used in the theme.
90
95
*/
91
96
val opacityTokens:OudsOpacitySemanticTokens
92
97
93
98
/**
94
-
* Size semantic tokens values used in the theme.
99
+
* The collection of size tokens (icons, constraints) used in the theme.
95
100
*/
96
101
val sizeTokens:OudsSizeSemanticTokens
97
102
98
103
/**
99
-
* Space semantic tokens values used in the theme.
104
+
* The collection of spacing tokens (padding, margins, gaps) used in the theme.
100
105
*/
101
106
val spaceTokens:OudsSpaceSemanticTokens
102
107
103
108
/**
104
-
* Allows customization of OUDS components.
109
+
* Specific tokens for customizing the internal behavior or style of OUDS components.
105
110
*/
106
111
val componentsTokens:OudsComponentsTokens
107
112
108
113
/**
109
-
* Allows customization of drawable resources used by OUDS components.
114
+
* Allows customization of drawable resources used explicitly by OUDS components.
110
115
*
111
-
* Caution:
116
+
* **Caution:**
112
117
* To avoid resource conflicts, Android recommends using a prefix or other consistent naming scheme that is unique to the module (or is unique across all project modules).
113
-
* So, we strongly recommend that you prefix your resources with the name of your theme. For example, if your theme is called "LoremIpsum" you might name your resources as ic_lorem_ipsum_checkbox_selected, ic_lorem_ipsum_chip_tick, etc.
118
+
* We strongly recommend that you prefix your resources with the theme name.
119
+
* Example: If your theme is "LoremIpsum", name resources like `ic_lorem_ipsum_checkbox_selected`, `ic_lorem_ipsum_chip_tick`, etc.
0 commit comments