unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
8.83k stars 711 forks source link

[Android] Disable Display Size setting support #13598

Open Soap-141 opened 1 year ago

Soap-141 commented 1 year ago

What would you like to be added

Might not be doable, made some research on it but it would be nice if we could ignore the display size setting on Android because it can mess up the UI quit a lot.

I guess the obvious fix would be to code better XAML with less fixes sizes and less range of sizes so there is no clipping and other weird behavior but sometime we have to do some workarounds or have fixed size / range of sizes that cause more issue when playing with this setting.

Default vs Larger with font scaling disabled.

Capture_105 Capture_106

Why is this needed

A flag to disable the display size scaling.

For which platform

Android

Anything else we need to know?

No response

jeromelaban commented 1 year ago

Thanks for the report.

There are those two properties that should be having an effect: https://github.com/unoplatform/uno/blob/669dbc7421905dcd8cb7caf09c56834d35ee24d9/src/Uno.UI/FeatureConfiguration.cs#L197-L203

But there may be cases where it does not apply properly.

Soap-141 commented 1 year ago

Here is my sample SampleDisplaySize.zip @ajpinedam

MartinZikmund commented 11 months ago

I think we should both support the FeatureConfiguration properties properly, and also verify we accurately model how Windows handles text scaling based on accessibility settings:

image