Comments (1)
With regards to the first icon that shows up, that code blocks sets it up, you can use the unfold icon there instead of the first one from the speed dial items.
_fabExtensionAnimator = FabExtensionAnimator(expandable_fab).apply {
speedDialItems[1].run { updateGlyphs("Hello", R.drawable.ic_unfold_less_24dp) }
}
Next, the run guard prevents the animation from running while it is currently animating. I use a immutable UiState
for this, and you're right that you don't need it in your project. You also don't need to call configure spring, that's just for the demo to change the bounciness of the spring.
Change your declaration of
expandable_fab.setOnClickListener {
_fabExtensionAnimator.isExtended = !_fabExtensionAnimator.isExtended
}
to
expandable_fab.setOnClickListener(_fabClickListener)
That should at least get the speed dial showing.
Finally, the mappings you have for your dismiss listener have to be updated.
dismissListener = {
when (it) {
null -> Unit // means it was dismissed with no selection
0 -> Unit // The first item was clicked, you may want to collapse your fab here.
else -> Unit // Some other item was clicked
}
}
from android-extensions.
Related Issues (13)
- Wrong order of selected tabs during back press? HOT 7
- StackNavigator shared element transition between activities HOT 3
- version 1.2.1 no definition for MultiStackNaviagor HOT 2
- Is this a property delegation in the declaration of the multiStackNavigator? HOT 2
- BackStackType Unlimited/Restricted in version 1.2.1 not working correctly HOT 4
- Example of Instagram-Like Navigation HOT 6
- Bug: bad transformation on list when going back to it HOT 6
- How to integrate Material Search Bar with RecyclerView? HOT 2
- How to add multiple viewholders in recyclerview? HOT 4
- Can't perform this action after onSaveInstanceState HOT 5
- Kotlin-gradle-publin declared twice with different versions HOT 1
- How to use MaterialFadeThrough Transition as StackTransactionModifier? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-extensions.