allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.ehsannarmani:ComposeAnimatedMenu:latest_version'
}
val items = listOf(
R.drawable.like,
R.drawable.dislike,
R.drawable.heart,
R.drawable.thanks,
R.drawable.heart,
)
AnimatedMenu(
open = true or false,
items = items,
itemsDuration = 200,
menuEnterAnim = scaleIn() + fadeIn(),
menuExitAnim = scaleOut() + fadeOut(),
itemBuilder = { index, item, modifier ->
Image(
modifier = modifier.clickable {
menuOpenVertical = false
},
painter = painterResource(id = item),
contentDescription = null
)
},
direction = MenuDirection.Vertical,
...
)