This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun TweetBottomBar( | |
fabConfiguration: BottomAppBar.FabConfiguration?, | |
homeListener: () -> Unit, | |
searchListener: () -> Unit, | |
notificationListener: () -> Unit, | |
messageListener: () -> Unit | |
) { | |
BottomAppBar( | |
fabConfiguration = fabConfiguration |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun ListScreen(state: MutableState<MutableList<Tweet>>) { | |
val (scaffoldState, onScaffoldStateChange) = state { | |
// state content collapsed | |
} | |
Scaffold( | |
scaffoldState = scaffoldState, | |
topAppBar = { | |
// top app bar content collapsed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun ListScreen(state: MutableState<MutableList<Tweet>>) { | |
val (scaffoldState, onScaffoldStateChange) = state { | |
// state collapsed | |
} | |
Scaffold( | |
scaffoldState = scaffoldState, | |
topAppBar = { | |
// top app bar contents collapsed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun TweetBottomBar( | |
homeListener: () -> Unit, | |
searchListener: () -> Unit, | |
notificationListener: () -> Unit, | |
messageListener: () -> Unit | |
) { | |
BottomAppBar { | |
IconButton( | |
modifier = Modifier.weight(1f), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Preview | |
@Composable | |
fun TweetBarPreview() { | |
TweetBar {} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun TweetBar(navigationClick: () -> Unit) { | |
TopAppBar( | |
title = { | |
Text("Tweetish") | |
}, | |
navigationIcon = { | |
IconButton(onClick = navigationClick) { | |
Icon(asset = vectorResource(id = R.drawable.ic_nav_drawer)) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun ActionRow( | |
// ActionRow parameters collapsed | |
) { | |
val context = ContextAmbient.current | |
Row( | |
modifier = Modifier.fillMaxWidth().padding(8.dp), | |
arrangement = Arrangement.SpaceAround | |
){ | |
// Row contents collapsed | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun ActionRow( | |
// ActionRow parameters collapsed | |
) { | |
val context = ContextAmbient.current | |
Row( | |
modifier = Modifier.fillMaxWidth() + Modifier.padding(8.dp), | |
arrangement = Arrangement.SpaceAround | |
){ | |
// Row contents collapsed | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun Share(onClick : () -> Unit) { | |
val icon = vectorResource(R.drawable.ic_share) | |
IconButton( | |
onClick = onClick, | |
modifier = Modifier.preferredSize(24.dp) | |
) { | |
Icon( | |
asset = icon, | |
modifier = Modifier.preferredSize(24.dp, 24.dp), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun DisplayName(name: String) { | |
Text( | |
text = name, | |
modifier = Modifier.padding(0.dp, 0.dp, 8.dp, 0.dp), | |
style = TextStyle( | |
color = Color.Black, | |
fontSize = 12.sp, | |
fontWeight = FontWeight.Bold | |
) |