Skip to content

Instantly share code, notes, and snippets.

@aritra-tech
Created May 9, 2024 14:21
Show Gist options
  • Save aritra-tech/115b120bc0490e8f44351ca91aafaa04 to your computer and use it in GitHub Desktop.
Save aritra-tech/115b120bc0490e8f44351ca91aafaa04 to your computer and use it in GitHub Desktop.
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
installSplashScreen()
super.onCreate(savedInstanceState)
setContent {
WearApp("Android")
}
}
}
@Composable
fun WearApp(greetingName: String) {
WearUITheme {
Box(
modifier = Modifier
.fillMaxSize()
.background(MaterialTheme.colors.background),
contentAlignment = Alignment.Center
) {
TimeText()
Text(
modifier = Modifier.fillMaxWidth(),
textAlign = TextAlign.Center,
color = MaterialTheme.colors.primary,
text = stringResource(R.string.hello_world, greetingName)
)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment