material-components / material-components/material-components-android

[ExposedDropdownMenu] Strange behaviour when OnDismissedListener is set

Open
#1,385 2 comments 2 reactions 0 assignees View on GitHub
bug Widget: TextField
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.