https://kotlinlang.org logo
#compose
Title
# compose
a

Android75

04/09/2022, 2:35 PM
In my custom TopAppBar i send as parameter the action…
Copy code
actions: @Composable RowScope.() -> Unit = {},
i’d like to have different action… how can create composable function like this
Copy code
actions  = {
        IconButton(onClick = {  }) {
            Icon(imageVector = Icons.Default.Share, contentDescription = "", tint = BlueDentPad)
        }
        Icon(
            Icons.Filled.ColorLens,tint = BlueDentPad,
            contentDescription = "Localized description"
        )
    }
like this… but it’s wrong
Copy code
fun RowScope.customAction()= {
    
        IconButton(onClick = { }) {
            Icon(imageVector = Icons.Default.Share, contentDescription = "", tint = BlueDentPad)
        }
        Icon(
            Icons.Filled.ColorLens, tint = BlueDentPad,
            contentDescription = "Localized description"
        )
    
}
6 Views