Created
September 15, 2021 16:03
-
-
Save DmytroShuba/ecad99db8e269319665859387ecd1454 to your computer and use it in GitHub Desktop.
How to test Jetpack Compose - Layout
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 MainScreen() { | |
Box( | |
contentAlignment = Alignment.Center, | |
modifier = Modifier | |
.fillMaxWidth() | |
.fillMaxHeight() | |
.background(Color.White) | |
) { | |
Button( | |
onClick = {...}, | |
modifier = Modifier.testTag("yourTestTag") | |
) { | |
Text(text = stringResource(R.string.click)) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment