Last active
November 2, 2021 11:35
-
-
Save HarryTylenol/ee32ad2a321c5bce01d660ca3565ff3f to your computer and use it in GitHub Desktop.
Devfest 2021 Jetpack Compose Lottery App
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
android { | |
// ... | |
buildFeatures { | |
compose = true | |
} | |
composeOptions { | |
kotlinCompilerExtensionVersion = '1.0.4' | |
} | |
} | |
dependencies { | |
implementation 'androidx.compose.ui:ui:1.0.4' | |
// Tooling support (Previews, etc.) | |
implementation 'androidx.compose.ui:ui-tooling:1.0.4' | |
// Foundation (Border, Background, Box, Image, Scroll, shapes, animations, etc.) | |
implementation 'androidx.compose.foundation:foundation:1.0.4' | |
// Material Design | |
implementation 'androidx.compose.material:material:1.0.4' | |
// Material design icons | |
implementation 'androidx.compose.material:material-icons-core:1.0.4' | |
implementation 'androidx.compose.material:material-icons-extended:1.0.4' | |
// Integration with activities | |
implementation 'androidx.activity:activity-compose:1.4.0' | |
// ... | |
} |
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
@Composable | |
fun LottoTheme( | |
content : @Composable () -> Unit | |
) { | |
MaterialTheme( | |
content = content | |
) | |
} |
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?) { | |
super.onCreate(savedInstanceState) | |
setContent { | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment