Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ class MaterialViewThemeUtils
val iconColors =
buildColorStateList(
android.R.attr.state_checked to dynamicColor.onSecondaryContainer().getArgb(scheme),
-android.R.attr.state_checked to dynamicColor.surfaceVariant().getArgb(scheme),
-android.R.attr.state_checked to dynamicColor.onSurfaceVariant().getArgb(scheme),
android.R.attr.state_focused to dynamicColor.onSecondaryContainer().getArgb(scheme),
android.R.attr.state_hovered to dynamicColor.onSecondaryContainer().getArgb(scheme),
android.R.attr.state_pressed to dynamicColor.onSecondaryContainer().getArgb(scheme)
Expand All @@ -589,7 +589,7 @@ class MaterialViewThemeUtils
val textColors =
buildColorStateList(
android.R.attr.state_checked to dynamicColor.onSecondaryContainer().getArgb(scheme),
-android.R.attr.state_checked to dynamicColor.surfaceVariant().getArgb(scheme),
-android.R.attr.state_checked to dynamicColor.onSurfaceVariant().getArgb(scheme),
android.R.attr.state_hovered to dynamicColor.onSecondaryContainer().getArgb(scheme),
android.R.attr.state_focused to dynamicColor.onSecondaryContainer().getArgb(scheme),
android.R.attr.state_pressed to dynamicColor.onSecondaryContainer().getArgb(scheme)
Expand Down Expand Up @@ -640,15 +640,15 @@ class MaterialViewThemeUtils
withScheme(chip.context) { scheme ->
val iconColors =
buildColorStateList(
android.R.attr.state_enabled to dynamicColor.surfaceVariant().getArgb(scheme),
android.R.attr.state_enabled to dynamicColor.onSurfaceVariant().getArgb(scheme),
-android.R.attr.state_enabled to
colorUtil.adjustOpacity(
dynamicColor.onSurface().getArgb(scheme),
ON_SURFACE_OPACITY_BUTTON_DISABLED
),
android.R.attr.state_focused to dynamicColor.surfaceVariant().getArgb(scheme),
android.R.attr.state_hovered to dynamicColor.surfaceVariant().getArgb(scheme),
android.R.attr.state_pressed to dynamicColor.surfaceVariant().getArgb(scheme)
android.R.attr.state_focused to dynamicColor.onSurfaceVariant().getArgb(scheme),
android.R.attr.state_hovered to dynamicColor.onSurfaceVariant().getArgb(scheme),
android.R.attr.state_pressed to dynamicColor.onSurfaceVariant().getArgb(scheme)
)

chip.chipStrokeColor = chipOutlineFilterColorList(scheme)
Expand All @@ -659,34 +659,34 @@ class MaterialViewThemeUtils

private fun chipOutlineColorList(scheme: DynamicScheme) =
buildColorStateList(
android.R.attr.state_enabled to dynamicColor.outline().getArgb(scheme),
android.R.attr.state_enabled to dynamicColor.outlineVariant().getArgb(scheme),
-android.R.attr.state_enabled to
colorUtil.adjustOpacity(
dynamicColor.onSurface().getArgb(scheme),
ON_SURFACE_OPACITY_BUTTON_OUTLINE_DISABLED
),
android.R.attr.state_hovered to dynamicColor.outline().getArgb(scheme),
android.R.attr.state_focused to dynamicColor.surfaceVariant().getArgb(scheme),
android.R.attr.state_pressed to dynamicColor.outline().getArgb(scheme)
android.R.attr.state_hovered to dynamicColor.outlineVariant().getArgb(scheme),
android.R.attr.state_focused to dynamicColor.onSurfaceVariant().getArgb(scheme),
android.R.attr.state_pressed to dynamicColor.outlineVariant().getArgb(scheme)
)

private fun chipOutlineFilterColorList(scheme: DynamicScheme) =
buildColorStateList(
android.R.attr.state_checked to dynamicColor.secondaryContainer().getArgb(scheme),
-android.R.attr.state_checked to dynamicColor.outline().getArgb(scheme)
-android.R.attr.state_checked to dynamicColor.outlineVariant().getArgb(scheme)
)

private fun chipSuggestionInputTextColorList(scheme: DynamicScheme) =
buildColorStateList(
android.R.attr.state_enabled to dynamicColor.surfaceVariant().getArgb(scheme),
android.R.attr.state_enabled to dynamicColor.onSurfaceVariant().getArgb(scheme),
-android.R.attr.state_enabled to
colorUtil.adjustOpacity(
dynamicColor.onSurface().getArgb(scheme),
ON_SURFACE_OPACITY_BUTTON_DISABLED
),
android.R.attr.state_hovered to dynamicColor.surfaceVariant().getArgb(scheme),
android.R.attr.state_focused to dynamicColor.surfaceVariant().getArgb(scheme),
android.R.attr.state_pressed to dynamicColor.surfaceVariant().getArgb(scheme)
android.R.attr.state_hovered to dynamicColor.onSurfaceVariant().getArgb(scheme),
android.R.attr.state_focused to dynamicColor.onSurfaceVariant().getArgb(scheme),
android.R.attr.state_pressed to dynamicColor.onSurfaceVariant().getArgb(scheme)
)

private fun rippleColor(scheme: DynamicScheme) =
Expand Down