SkillAgentSearch skills...

ComposeMultiFab

android multi-fab that made with jetpack-compose

Install / Use

/learn @jisungbin/ComposeMultiFab
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<img src="https://user-images.githubusercontent.com/40740128/133895784-41d6dfec-f09c-4284-a2c0-5f254601f969.gif" align="right" width="33%"/>

ComposeMultiFab

android multi-fab that made with jetpack-compose


Download

implementation "io.github.jisungbin:multifab:${version}"

Usage

@Composable
fun MultiFloatingActionButton(
    modifier: Modifier = Modifier,
    items: List<MultiFabItem>,
    fabState: MutableState<MultiFabState> = rememberMultiFabState(),
    fabIcon: FabIcon,
    fabOption: FabOption = FabOption(),
    onFabItemClicked: (fabItem: MultiFabItem) -> Unit,
    stateChanged: (fabState: MultiFabState) -> Unit = {}
)

MultiFabItem

/**
 * @param id Cannot be duplicated with the [id] value of another [MultiFabItem].
 */
data class MultiFabItem(
    val id: Int,
    @DrawableRes val iconRes: Int,
    val label: String = ""
)

FabOption

/**
 * Affects all fabs including sub fabs.
 */
@Composable
fun FabOption(
    backgroundTint: Color = MaterialTheme.colors.secondary,
    iconTint: Color = contentColorFor(backgroundTint),
    showLabels: Boolean = false
): FabOption

FabIcon

/**
 * Affects the main fab icon.
 *
 * @param iconRes [MultiFloatingActionButton]'s main icon
 * @param iconRotate If is not null, the [iconRes] rotates as much as [iconRotate] when [MultiFloatingActionButton] is in [MultiFabState.Expand] state.
 */
fun FabIcon(@DrawableRes iconRes: Int, iconRotate: Float? = null): FabIcon

🤗 Happy Coding :)

View on GitHub
GitHub Stars9
CategoryDevelopment
Updated1y ago
Forks0

Languages

Kotlin

Security Score

75/100

Audited on Jun 27, 2024

No findings