Pragnesh Meniya
11/22/2023, 5:42 AMascii
11/22/2023, 6:14 AMandroidx.compose.material3:material3-window-size-class
or, again, define your own.
In my opinion though, if you're simply scaling up UI to fit larger screens, you're wasting the fact that you have more screen real estate to work with. Displaying the same amount of info regardless of available space feels wrong.Divyansh Kushwaha
11/22/2023, 10:05 AMinline val Int.sdp: Dp
@Composable get() {
val configuration = LocalConfiguration.current
val screenWidth = configuration.screenWidthDp.toFloat()
return screenWidth.div(BASE_SCREEN_WIDTH).times(this).dp
}
However, I do agree with @ascii. Instead of just scaling the content, we should use the available space judiciously.