Skip to content

Instantly share code, notes, and snippets.

@rubenquadros
Last active August 18, 2021 19:28
Show Gist options
  • Save rubenquadros/e518a0a78f2507c477cfbbc371ae474c to your computer and use it in GitHub Desktop.
Save rubenquadros/e518a0a78f2507c477cfbbc371ae474c to your computer and use it in GitHub Desktop.
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