Relative Content

Tag Archive for androidxmlkotlinviewandroid-jetpack

Which resource qualifiers should I use for devices having similar screen sizes but showing views in different sizes?

I am working with views in xml in Android development, and I noticed that some devices with similar screen sizes (both in terms of DPI and pixels) show the UI of the app differently. For example, a OnePlus Nord 2T shows the text and UI views in a much larger size than compared to a Moto G9 Plus. Both use the normal scaling setting of the display selectable in the phone’s settings. I tried using screen-size specific layouts in xml, however it does not make any sense, since both devices have similar screen sizes both in pixels and dpi.