Last active
May 27, 2020 11:15
-
-
Save ahmedrizwan/d3078b7661c1ed14bd4d1fb48a342a5f to your computer and use it in GitHub Desktop.
Jetpack Compose Calculator
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
setContent { | |
MaterialTheme(colors = lightThemeColors) { | |
WithConstraints { constraints, _ -> | |
val boxHeight = with(DensityAmbient.current) { constraints.maxHeight.toDp() } | |
val boxWidth = with(DensityAmbient.current) { constraints.maxWidth.toDp() } | |
Content( | |
constraints = constraints, | |
boxHeight = boxHeight, | |
boxWidth = boxWidth | |
) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment