Created
February 5, 2023 12:37
-
-
Save SuvidhaMalaviya/9386d672dadcbe98920fe41dd7c26f61 to your computer and use it in GitHub Desktop.
Android Jetpack Compose
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
import androidx.compose.Composable | |
import androidx.ui.core.Text | |
import androidx.ui.core.dp | |
import androidx.ui.core.setContent | |
import androidx.ui.foundation.VerticalScroller | |
import androidx.ui.graphics.Color | |
import androidx.ui.layout.Column | |
import androidx.ui.layout.Spacing | |
import androidx.ui.material.MaterialTheme | |
import androidx.ui.material.Surface | |
import androidx.ui.tooling.preview.Preview | |
import androidx.compose.state | |
import androidx.compose.unaryPlus | |
import androidx.compose.Model | |
@Composable | |
fun SimpleApp() { | |
MaterialTheme { | |
VerticalScroller { | |
Column(modifier = Spacing(16.dp)) { | |
for (i in 1..10) { | |
Text(text = "Item $i", color = Color.Black) | |
} | |
} | |
} | |
} | |
} | |
@Preview | |
@Composable | |
fun DefaultPreview() { | |
SimpleApp() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment