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

ChipGroupLayout will crash if click on already selected chip #43

Closed
aSvetenco opened this issue Apr 23, 2020 · 1 comment · Fixed by #42
Closed

ChipGroupLayout will crash if click on already selected chip #43

aSvetenco opened this issue Apr 23, 2020 · 1 comment · Fixed by #42
Labels
android Relates to Android platform bug Something isn't working

Comments

@aSvetenco
Copy link

Abstract

ChipGroupLayout will crash if click on already selected chip

Platform related info:

  • OS: Android
  • OS version: Android 10(29)

Steps to reproduce

  1. Go to 'whatever screen where enum tools are available "MEMORY" for example'
  2. Click on 'second-option'
  3. Then click one more time on 'second-option'
  4. App will force-stop

Expected
The second option will remain selected

Actual
App force-stop

Additional context

Crash occurs because of 'getCheckedChipId' returns 'NO_ID (-1)'. ChipGruops returns NO_ID in order to unselect already selected chip. I dont know if this behavior applicable for devtools-library. If yes, can be added a check for NO_ID before retrieving chipName from chips map.

@aSvetenco aSvetenco added the bug Something isn't working label Apr 23, 2020
@maximbircu maximbircu added the android Relates to Android platform label Apr 23, 2020
@maximbircu
Copy link
Owner

maximbircu commented Apr 23, 2020

Thanks, @aSvetenco, I notice this issue too, yesterday. I'll fix it in #42 👍

@maximbircu maximbircu mentioned this issue Apr 23, 2020
3 tasks
@maximbircu maximbircu linked a pull request Apr 23, 2020 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Relates to Android platform bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants