skydoves / PowerMenu

:fire: Powerful and modernized popup menu with fully customizable animations.
Apache License 2.0
1.19k stars 175 forks source link

can l modify ripple color effect #102

Closed yuaneko95 closed 1 year ago

sebastienrouif commented 1 year ago

How are you building your menu? I you are using Material, the ripple should come from colorControlHighlight theme attribute which you could add here https://github.com/skydoves/PowerMenu/blob/main/app/src/main/res/values/styles.xml#L36 in PopupCardThemeOverlay

yuaneko95 commented 1 year ago

here is my code

image

I'm still confused about how to change the ripple color

sebastienrouif commented 1 year ago

Check how the theme overlay is applied in https://github.com/skydoves/PowerMenu/blob/main/app/src/main/java/com/skydoves/powermenudemo/PowerMenuUtils.java#L143 inseatd of calling requireActivity() use a styled context and add your ripple colour to PopupCardThemeOverlay in https://github.com/skydoves/PowerMenu/blob/main/app/src/main/res/values/styles.xml#L36

  <style name="PopupCardThemeOverlay">
    <item name="materialCardViewStyle">@style/PopupCardStyle</item>
    <item name="colorControlHighlight">#0ff</item>
  </style>
sebastienrouif commented 1 year ago

Did it solve your problem?

yuaneko95 commented 1 year ago

yes it's solve my problem. thanks