Created
May 9, 2024 14:21
-
-
Save aritra-tech/115b120bc0490e8f44351ca91aafaa04 to your computer and use it in GitHub Desktop.
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
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