[FloatingActionButton] Behavior change in 1.2.0 - different behavior and strange animation when toggling isEnabled attribute
See original GitHub issueDescription:
After bumping library version the FloatingActionButton
changes behavior when setting isEnabled=false
. In 1.2.0 it:
a) loses background color
b) shows strange octogonal shape
Expected behavior: Behavior doesn’t change after library update (or at least it is clearly metioned in the release notes)
1.1.0 | 1.2.0 |
---|---|
Source code: https://github.com/mateuszkwiecinski/fab_animation_issue just downgrade the library version to 1.1.0
Android API version: 29
Material Library version: 1.2.0
Device: Multiple
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
android - How to enable/disable FloatingActionButton Behavior
I am working on app in some fragment i want to hide FloatingActionButtton. When i set android:visibility="gone". Behavior animation show me ...
Read more >Compose Material - Android Developers
Build animations in their Jetpack Compose applications to enrich the user experience. compose.compiler, Transform @Composable functions and enable optimizations ...
Read more >FloatingActionButton class - material library - Dart API
If the onPressed callback is null, then the button will be disabled and will not react to touch. It is highly discouraged to...
Read more >Button - KivyMD 1.2.0.dev0 documentation
Material Design spec, Buttons: floating action button ... You can change the color of MDIconButton as the text color of MDLabel , substituting ......
Read more >AnimatedVisibility doesn't work with FloatingActionButton in ...
With some animation types, including AnimatedVisibility default ones, the view doesn't appear at all. var flag by remember { mutableStateOf(true) } Scaffold( ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
About the background color it is not a bug. The version
1.2.0
changed the background color and icon tint to support for enabled/disabled state in theFloatingActionButton
.From:
To:
You can check the selector:
The disabled state is based on
colorOnSurface
. In your case you are using the default value (#000000
with alpha=0.12
)I’ve submitted a PR to add the info about the states in the doc (#1619).
But what to do with transparent button? It’s occur.