material-components / material-components/material-components-android
[ExposedDropdownMenu] Strange behaviour when OnDismissedListener is set
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
Everything works fine until we set `OnDismissListener` on the `AutoCompleteTextView`. If the said listener is set and we **click anywhere on the screen** else than the end icon or `AutoCompleteTextView` while the dropdown is visible, the dropdown dismisses correctly but end icon is not rotated back upwards. Now when we click on the end icon or `AutoCompleteTextView` with the intention to show dropdown again, only the end icon is rotated back upwards and dropdown is not shown. It seems that the view has only reset itself this time. On next click though, the dropdown shows properly.
Tried on physical device Xiaomi Mi Note 8 Pro using Android 9 (API level 28)
I've tried both releases of material components 1.2.0-alpha03 and 1.3.0-alpha01 and the issue persists.
Contributor guide
Research direction
Start by reproducing the issue with ExposedDropdownMenu, AutoCompleteTextView, and an OnDismissListener on Android 9 or a comparable setup. Verify the behavior when tapping outside the dropdown and then tapping the end icon or AutoCompleteTextView; done means the dropdown and end-icon state remain synchronized without requiring an extra tap.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100