Merge "Add hover and pressed states for app chip and menu items" into main

This commit is contained in:
Jordan Silva authored and Android (Google) Code Review committed 2025-03-11 10:27:51 -07:00
commit afff31deb3
7 files changed
+112 -2

No files matched your search

@@ -22,7 +22,6 @@ import android.animation.ValueAnimator
import android.content.Context
import android.graphics.Outline
import android.graphics.Rect
import android.graphics.drawable.GradientDrawable
import android.graphics.drawable.ShapeDrawable
import android.graphics.drawable.shapes.RectShape
import android.util.AttributeSet
@@ -165,7 +164,18 @@ constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int = 0) :
recentsViewContainer.layoutInflater.inflate(R.layout.task_view_menu_option, this, false)
as LinearLayout
if (enableOverviewIconMenu()) {
(menuOptionView.background as GradientDrawable).cornerRadius = 0f
menuOptionView.background =
ResourcesCompat.getDrawable(
resources,
R.drawable.app_chip_menu_item_bg,
context.theme,
)
menuOptionView.foreground =
ResourcesCompat.getDrawable(
resources,
R.drawable.app_chip_menu_item_fg,
context.theme,
)
}
menuOption.setIconAndLabelFor(
menuOptionView.findViewById(R.id.icon),