Skip to content

Instantly share code, notes, and snippets.

@SuvidhaMalaviya
Last active February 5, 2023 12:39
Show Gist options
  • Save SuvidhaMalaviya/3ca0358955b246d32ae2b11d3f3524dd to your computer and use it in GitHub Desktop.
Save SuvidhaMalaviya/3ca0358955b246d32ae2b11d3f3524dd to your computer and use it in GitHub Desktop.
Android JetPack Compose
import androidx.compose.Composable
import androidx.ui.core.Text
import androidx.ui.core.setContent
import androidx.ui.engine.geometry.Rect
import androidx.ui.engine.geometry.size
import androidx.ui.graphics.Color
import androidx.ui.layout.Container
import androidx.ui.material.MaterialTheme
import androidx.ui.material.surface.Surface
import androidx.ui.tooling.preview.Preview
import androidx.compose.state
import androidx.compose.unaryPlus
import androidx.compose.Ambient
import androidx.compose.remember
import androidx.compose.Model
@Composable
fun HelloWorld() {
Text(text = "Hello World!")
}
@Preview
@Composable
fun DefaultPreview() {
MaterialTheme {
HelloWorld()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment