Skip to content

Instantly share code, notes, and snippets.

@rubenquadros
Last active Aug 18, 2021
Embed
What would you like to do?
Complete home app bar
@Composable
fun HomeAppBar(title: String, openSearch: () -> Unit, openFilters: () -> Unit) {
TopAppBar(
title = { Text(text = title, color = Color.White) },
backgroundColor = Color(0xFFF50057),
actions = {
IconButton(onClick = openSearch) {
Icon(
imageVector = Icons.Filled.Search,
contentDescription = "Search",
tint = Color.White
)
}
IconButton(onClick = openFilters) {
Icon(
imageVector = Icons.Filled.FilterList,
contentDescription = "Filter",
tint = Color.White
)
}
}
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment