This file contains 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
@OptIn(ExperimentalMaterial3Api::class) | |
@Composable | |
fun Greeting() { | |
val dismissState = rememberDismissState() | |
SwipeToDismiss( | |
state = dismissState, | |
background = { | |
val color by animateColorAsState( | |
when (dismissState.targetValue) { | |
DismissValue.Default -> Color.Yellow |
This file contains 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
@OptIn(ExperimentalMaterial3Api::class) | |
@Composable | |
fun ScaffoldShower() { | |
Scaffold( | |
topBar = { TopAppBarProvider() }, | |
floatingActionButton = { FABProvider() }, | |
bottomBar = { BottomBarProvider() } | |
) { paddingValues -> | |
AppBodyProvider(modifier = Modifier.padding(paddingValues)) | |
} |
This file contains 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 CardShower() { | |
val context = LocalContext.current | |
Row() { | |
Card( | |
modifier = Modifier | |
.padding(8.dp) | |
.clickable { | |
Toast | |
.makeText(context, "Filled Card Clicked", Toast.LENGTH_SHORT) |
This file contains 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 MatchParentSizeModifier(modifier: Modifier) { | |
Box { | |
Spacer( | |
modifier = Modifier | |
.matchParentSize() | |
.background(Color.Gray) | |
) | |
WebsiteNameShower() | |
} |