Home > database >  .net MAUI - ContentPage only has 50% of ScreenSize of Device on AndroidTV
.net MAUI - ContentPage only has 50% of ScreenSize of Device on AndroidTV

Time:12-03

I am currently working on a Display-Application for a small company, which will use an AndroidTV (but maybe a Windows PC) to show important information at the store window. As .NET Maui is the new approach for multi-platform apps, I am using the framework to build this app.

Testing on AndroidTV now with the mostly finished design I stumbled on a weird behavior. The ScreenSize of AndroidTV is set to 1920x1080 as expected, but the ContentPages inside of the Shell are only 960x540(so exaclty half of fullHD). I tried using the answers of this question, but sadly setting to fullscreen on android does not work.

If anyone already had the same problem as me, it would be great to hear about the solution. But maybe it's a bug from .net MAUI after all and we can't really do anything against it right now.

CodePudding user response:

Are you saying that the page is only using 1/4 of the screen area?

It would help if you show some code; unclear whether you have written the UI in such a way that it will scale.

If you used hardcoded numbers, then be aware that Maui's screen unit is a "Device-Independent Unit" (DIU).
If the Device reports its Density to be "2", then each DIU is "2x2 pixels"; there will be 960 x 540 DIUs on a 1920x1080 "Density=2" display.

  • Related