Hamza GATTAL
05/23/2023, 2:13 PM@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun WalletTopAppBar(
messagesCount: Int = 3,
navigateToNotifications: () -> Unit = { }
) {
TopAppBar(
title = {
Text(
text = stringResource(id = R.string.app_bar_title)
)
},
navigationIcon = {
Icon(
modifier = Modifier
.size(size = 65.dp)
.graphicsLayer(
shape = CircleShape,
clip = true
),
painter = painterResource(id = R.drawable.ic_splash_screen),
contentDescription = null
)
},
actions = {
BadgedBox(
modifier = Modifier,
badge = {
Badge(
contentColor = MaterialTheme.colorScheme.onPrimaryContainer,
containerColor = MaterialTheme.colorScheme.primaryContainer,
content = {
Text(
text = messagesCount.toString()
)
}
)
},
content = {
IconButton(
onClick = navigateToNotifications,
content = {
Icon(
Icons.Filled.Notifications,
contentDescription = null
)
}
)
}
)
}
)
}
the recorddewildte
05/23/2023, 4:40 PMHamza GATTAL
05/23/2023, 4:42 PMdewildte
05/23/2023, 4:43 PMdewildte
05/23/2023, 4:43 PMHamza GATTAL
05/23/2023, 4:43 PM@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun WalletTopAppBar(
messagesCount: Int = 3,
navigateToNotifications: () -> Unit = { }
) {
TopAppBar(
title = {
Text(
text = stringResource(id = R.string.app_bar_title)
)
},
navigationIcon = {
Icon(
modifier = Modifier
.size(size = 65.dp)
.graphicsLayer(
shape = CircleShape,
clip = true
),
painter = painterResource(id = R.drawable.ic_splash_screen),
contentDescription = null
)
},
actions = {
BadgedBox(
modifier = Modifier,
badge = {
Badge(
contentColor = MaterialTheme.colorScheme.onPrimaryContainer,
containerColor = MaterialTheme.colorScheme.primaryContainer,
content = {
Text(
text = messagesCount.toString()
)
}
)
},
content = {
IconButton(
onClick = navigateToNotifications,
content = {
Icon(
Icons.Filled.Notifications,
contentDescription = null
)
}
)
}
)
}
)
}