Multi Float Action Button
Including in your project
Gradle
Add below codes to your root build.gradle
file (not your module build.gradle file).
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
And add a dependency code to your module's build.gradle
file.
dependencies {
implementation 'com.github.iamageo:MultiFab:{multifab-version}'
}
Anatomy
1 - MultiFloatActionButton
- FabIcon
- FabOption
- itemsMultiFab
- onFabItemClicked
- FabTitle
- ShowFabTitle
2 - MultiFabItem
Basic Usage
Add in you Activity file.
MultiFloatingActionButton(
fabIcon = FabIcon(
iconRes = R.drawable.ic_baseline_add_24,
iconResAfterRotate = R.drawable.ic_baseline_remove_24,
iconRotate = 180f
),
fabOption = FabOption(
iconTint = Color.White,
showLabels = true,
backgroundTint = Color.Blue,
),
itemsMultiFab = listOf(
MultiFabItem(
icon = R.drawable.ic_baseline_add_24,
label = "first",
labelColor = Color.White
),
MultiFabItem(
icon = R.drawable.ic_baseline_add_24,
label = "second",
labelColor = Color.White
),
),
onFabItemClicked = { println(it) },
fabTitle = "MultiFloatActionButton",
showFabTitle = false
)
Preview
License
Copyright 2022 Geovani Amaral
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.