Home > Blockchain >  Having the same control width between multiple devices
Having the same control width between multiple devices

Time:10-23

I am developing an app with Xamarin. When I debug, I use an Samsung Phone (SM-A520W, 1920x1080, 424ppi, 5.2 in).

However, the final product will be on a different device (Juniper Allegro 3, 640x480, 4.2in, Android 7.1). The final device is expensive, so this is why not every developer have one.

Is there any way to make the Samsung phone show a grid with the same width has it would be on the final device? Something that looks like the grid is centered and there are empty spaces on each side.

This would help because, when I design a form, the developer who has the final device must always test and readjust my code because we use devices with different resolutions and pixel density (the columns headers are not always readable).

Note: The app is in landscape, if this is relevant.

I have tried this with no success : See equal sized boxes in iPhone 11 Pro Max and iPhone SE

Read more here: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/creating-mobile-apps-xamarin-forms/summaries/chapter05

Also: https://docs.microsoft.com/en-us/xamarin/android/app-fundamentals/resources-in-android/resources-for-varying-screens

  • Related