This repository has been archived by the owner on Dec 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Ryan Bishop Mayobre edited this page Jun 24, 2020
·
3 revisions
MultiButton is button library for Android. This library provides multiple button styles and is written all in Kotlin.
- Easy to use
- Lightweight
- Customizable
- Material Design
Here are the available button designs and their Wiki pages:
- Speed Dial Button -Wiki page
- Floating action button (FAB) - Wiki page
- Expandable floating action button - Wiki page
XML example code
<com.multibutton.library.speeddial.SpeedDial
android:id="@+id/speedDialButton"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:collapsedIcon="@drawable/ic_add_white"
app:expandedIcon="@drawable/ic_add_white"
app:collapseAnim="@anim/fab_rotate_backward"
app:expandAnim="@anim/fab_rotate_forward"
app:showAnim="@anim/fab_slide_up"
app:hideAnim="@anim/fab_slide_down"/>
Kotlin example code
val button: SpeedDial = findViewById<SpeedDial>(R.id.speedDialButton).apply {
/* Builder style design. */
addAction(
SpeedDialAction.Builder(context)
.setId(R.id.button1)
.setImage(R.drawable.ic_android_white)
.setLabel("button 1")
.setShowAnimation(R.anim.fab_fade_in)
.setHideAnimation(R.anim.fab_fade_out)
.build())
addAction(
SpeedDialAction.Builder(context)
.setId(R.id.button2)
.setImage(R.drawable.ic_android_white)
.setLabel("button 2")
.setShowAnimation(R.anim.fab_fade_in)
.setHideAnimation(R.anim.fab_fade_out)
.build())
}
Please report issues with the library or inaccurate information from the Wiki to issues.