Naveen
08/21/2024, 12:45 AMIan Lake
08/21/2024, 1:14 AMNaveen
08/21/2024, 1:52 AMIan Lake
08/21/2024, 2:20 AMIan Lake
08/21/2024, 2:23 AMMohit
08/21/2024, 3:51 AMNaveen
08/21/2024, 4:39 AMNaveen
08/21/2024, 4:40 AMIan Lake
08/21/2024, 4:45 AMMohit
08/21/2024, 4:54 AMNaveen
08/21/2024, 6:41 AMmdpi/values/dimens.xml
, hdpi/values/dimens.xml
and so on).
My doubt:
Do we have to follow same solution for jetpack compose UI as well or there is a better way to make this button appear as of same height in different screen with their respective pixel densities? Also if there is any better way to handle this using constraintlayout or anything else will be of great help.
Please let me know if you have got my question otherwise i can go more in depth.Ian Lake
08/21/2024, 2:10 PMSiyamed
08/21/2024, 5:40 PMNaveen
08/22/2024, 2:42 AMBox(
modifier = Modifier.fillMaxSize(),
contentAlignment = Alignment.Center
) {
Text(text = "A", style = TextStyle(color = Color.Red, fontSize = 305.sp))
}
and running on 2 devices with 6inch screen but different resolutions:
Left: 1080x2160
Right: 720x1440
As you can see the text “A” does appear larger on the left one but I want to have this text to take equal amount of height as it takes on right device. How can i achieve this ?Ian Lake
08/22/2024, 2:52 AMNaveen
08/22/2024, 6:24 AM