Skip to content

Instantly share code, notes, and snippets.

@Mercandj
Last active June 3, 2022 07:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mercandj/7e22c4e89b44fcc532c7c6724d808ceb to your computer and use it in GitHub Desktop.
Save Mercandj/7e22c4e89b44fcc532c7c6724d808ceb to your computer and use it in GitHub Desktop.
package com.medium
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.material.Text
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.compose.ui.window.Window
import androidx.compose.ui.window.WindowState
import androidx.compose.ui.window.application
fun main() = application {
Window(
onCloseRequest = ::exitApplication,
state = WindowState(width = 400.dp, height = 300.dp),
title = "Medium"
) {
Box(modifier = Modifier.fillMaxWidth().fillMaxHeight()) {
Text(
text = "Hello World",
fontSize = 30.sp,
modifier = Modifier.align(Alignment.Center)
)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment