question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Chip] Chip doesn't expand with animation when checked

See original GitHub issue

Description: When I check a Chip in a ChipGroup the animation does not work properly.

Expected behavior: ezgif com-video-to-gif (1)

Source code: stateChipGroup.setOnCheckedChangeListener { group, checkedId -> if (checkedId == View.NO_ID) { //user tried to uncheck the checked button group.check(lastCheckedId) return@setOnCheckedChangeListener } lastCheckedId = checkedId val chip = stateChipGroup.findViewById<View?>(checkedId) if (chip != null && chip is Chip) { when (chip.text) { getString(R.string.enabled) -> { sharedPref?.edit { putInt(CHIP_KEY_STATE, BEACON_VISIBLE) commit() } } getString(R.string.disabled) -> { sharedPref?.edit { putInt(CHIP_KEY_STATE, BEACON_INVISIBLE) commit() } } getString(R.string.both) -> { sharedPref?.edit { putInt(CHIP_KEY_STATE, BEACON_BOTH) commit() } } } vm.updateRecyclerView() } }

Current behavior ezgif com-video-to-gif (2)

Android API version: Android API version here

Material Library version: 1.1.0-alpha08

Device: OnePlus 7 Pro, OnePlus 3t

To help us triage faster, please check to make sure you are using the latest version of the library. Cannot since app crashes due to error #605

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ldjcmucommented, Sep 30, 2019

Hey,

I’ll re-open this issue for the animation. We have no plans to change this animation anytime soon even though we agree that it doesn’t look as smooth as the design site’s version.

0reactions
thirstycodacommented, Feb 21, 2022

+1

The lack of animation is jarring. It isn’t as described in the material design documentation

Read more comments on GitHub >

github_iconTop Results From Across the Web

Animate Chip checking in Material Chipgroup (Android)
and that works fine on the chipGroup but the content of the Chip (tick appearing and text rescaling) does not animate. Please tell...
Read more >
Chip - Android Developers
Sets whether this chip should expand its bounds (if needed) to meet the minimum touch target size. void, setGravity(int gravity).
Read more >
My Debit Card Chip Is Not Working — What To Do?
If your debit card chip not working, don't panic. Here are some options you can use to help you get your card working...
Read more >
Building Beautiful Transitions with Material Motion for Android
Examples include a list item that expands into a details page, a FAB that morphs into a toolbar, or a chip that expands...
Read more >
Chips | Angular Material
Chips allow users to view information, make selections, filter content, ... By default, <mat-chip> renders a chip with Material Design styles applied.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found