https://github.com/bitvale/lavafab
💧 Android floating action button menu with "lava" animation
https://github.com/bitvale/lavafab
android animation fab floating-action-button menu ui
Last synced: about 1 year ago
JSON representation
💧 Android floating action button menu with "lava" animation
- Host: GitHub
- URL: https://github.com/bitvale/lavafab
- Owner: bitvale
- Created: 2018-08-31T10:33:18.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-05T03:17:10.000Z (almost 8 years ago)
- Last Synced: 2025-04-08T21:22:33.242Z (about 1 year ago)
- Topics: android, animation, fab, floating-action-button, menu, ui
- Language: Kotlin
- Size: 628 KB
- Stars: 56
- Watchers: 3
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LavaFab

[](https://opensource.org/licenses/Apache-2.0)
[](http://developer.android.com/index.html)
[](https://android-arsenal.com/api?level=19)
This is an Android project allowing to animate a Floating Action Button menu with "lava" animation.
USAGE
-----
Just add LavaFab view in your layout XML and LavaFab library in your project via Gradle:
```gradle
dependencies {
implementation 'com.bitvale:lavafab:1.0.1'
}
```
XML
-----
```xml
```
You must use the following properties in your XML to change your LavaFab.
##### Properties:
* `app:lavaBackgroundColor` (color) -> default ?attr/colorAccent
* `app:lavaParentSize` (dimension) -> default 56dp
* `app:lavaDrawShadow` (boolean) -> default false
* `app:lavaChild` (flag) -> default left|top
* `app:lavaParentIcon` (drawable) -> default none
* `app:lavaLeftIcon` (drawable) -> default none
* `app:lavaLeftTopIcon` (drawable) -> default none
* `app:lavaTopIcon` (drawable) -> default none
* `app:lavaRightTopIcon` (drawable) -> default none
* `app:lavaRightIcon` (drawable) -> default none
* `app:lavaRightBottomIcon` (drawable) -> default none
* `app:lavaBottomIcon` (drawable) -> default none
* `app:lavaLeftBottomIcon` (drawable) -> default none
Kotlin
-----
```kotlin
with(lava_fab) {
setLavaBackgroundResColor(R.color.fab_color)
setParentOnClickListener { lava_fab_center.trigger() }
setChildOnClickListener(Child.TOP) { lava_fab_center.collapse() }
setChildOnClickListener(Child.LEFT) { // some action }
enableShadow()
setParentIcon(R.drawable.ic_parent)
setChildIcon(Child.TOP, R.drawable.ic_child_top)
setChildIcon(Child.LEFT, R.drawable.ic_child_left)
}
```
LICENCE
-----
LavaFab by [Alexander Kolpakov](https://play.google.com/store/apps/dev?id=7044571013168957413) is licensed under an [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).