Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with the ripple effect in widgets #4254

Open
HehehBoiii78 opened this issue Aug 7, 2024 · 0 comments
Open

Bug with the ripple effect in widgets #4254

HehehBoiii78 opened this issue Aug 7, 2024 · 0 comments

Comments

@HehehBoiii78
Copy link

HehehBoiii78 commented Aug 7, 2024

Description:
The ripple effect of: a menu in the top app bar, a list item in a drop-down menu, single-choice or multi-choice items in a Material 3 dialog and a ListView - doesn't start from the location of the touch properly. This problem has been sickening for years at this point.
In the "Steps to reproduce" section, I've only shown one widget which does have this issue as an example, but in the attachment attached, other widgets affected by this issue are shown as well.

Steps to reproduce:

  1. Create a new project in Android Studio.
  2. Add a "Menu" to the "Toolbar" of the project. (Add a Toolbar first if it isn't there already)
    • Jetpack Compose must not be used to reproduce this bug, as this issue isn't present in it. Instead, use any version of the library provided by this repository (Material Components for Android).
  3. Add items to the menu.
  4. Touch and hold an item in the menu.
    • At first, the ripple starts from the center of the item.
  5. Touch and hold the same item again.
    • Then, from where you touched the item last time, the ripple will start from there.
  6. Touch and hold the same item once again.
    • Then, from where you touched the item last time, the ripple will start from there.

Expected behavior:
The ripple should start from the location of the touch everytime, not from a completely different location.

Source code:
Not applicable.

Minimal sample app repro:
The attachment below has a ZIP file which contains the source code of an app which exactly demonstrates the issue outlined.
Bug_Demo.zip

Android API version:
Not applicable

Material Library version:
Happens with any version of this library.

Device:
Any Android device (as I've not tested this on iPhones yet).

Additional text:
In the drop-down menu present in the provided app, the ripple is even weird. The ripple first starts from the correct location, then starts only from the center if the same item is interacted with repeatedly.

If this 'bug' is intentional:

  1. Adding ripple effects to LinearLayouts is perfectly functional and it starts from the correct location everytime, and quickly.
  2. If this was made for a performance increase (I'm just speculating), that's invalid because:
    • If the ripple in the menu starts from the previous location when the same item is interacted with, then that means the ripple-location-tracking is working alltime.
    • Normal ripple effects behave normally, without any delay.
@HehehBoiii78 HehehBoiii78 changed the title **Description:** The ripple effect of: a menu in the top app bar, a list item in a drop-down menu and a ListView - doesn't start from the location of the touch properly. This problem has been sickening for years at this point. In the "Steps to reproduce" section, I've only shown 1 widget which does have this issue as an example, but in the attachment attached, other widgets affected by this issue are shown as well. The ripple effect of: a menu in the top app bar, a list item in a drop-down menu and a ListView - doesn't start from the location of the touch properly. This problem has been sickening for years at this point. In the "Steps to reproduce" section, I've only shown 1 widget which does have this issue as an example, but in the attachment attached, other widgets affected by this issue are shown as well. Aug 7, 2024
@HehehBoiii78 HehehBoiii78 changed the title The ripple effect of: a menu in the top app bar, a list item in a drop-down menu and a ListView - doesn't start from the location of the touch properly. This problem has been sickening for years at this point. In the "Steps to reproduce" section, I've only shown 1 widget which does have this issue as an example, but in the attachment attached, other widgets affected by this issue are shown as well. Bug with the ripple effect in widgets Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants