Repository navigation
Description
Current behavior
Despite the documentation stating that Uno automatically scales text in response to accessibility configuration on Android and iOS. This is not happening on either the emulator or test device I am using.
I added the inverse of the disabling code linked above just in case it's now disabled by default to the app constructor to enable text scaling but it had no effect on observed behaviour.
Screenshots
At default text size:
At +2 text size:
Expected behavior
Displayed text should change size in response to accessibility configuration made in platform settings.
How to reproduce it (as minimally and precisely as possible)
Steps to reproduce:
-
created a new app from template.
-
build & deployed to Android Emulator (API level 35).
-
switched to Settings > Display Size and text.
-
adjusted Font Size slider to two places larger from the default.
-
switched back to the app.
-
there was no change in the displayed text.
-
switched to app drawer to confirm OS had changed it's default text size. It had.
-
deployed to device at API level 33 & it exhibited the same behaviour.
Demo project
Workaround
N/A
Works on UWP/WinUI
None
Environment
No response
NuGet package version(s)
N/A
Affected platforms
Android
IDE
Rider Windows
IDE version
JetBrains Rider 2024.3 (Build #RD-243.21565.191)
Relevant plugins
Runtime version: 21.0.5+8-b631.16 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.windows.WToolkit
Windows 11.0
.NET Core v8.0.4 x64 (Server GC)
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 2048M
Cores: 16
Registry:
ide.experimental.ui=true
i18n.locale=
Non-Bundled Plugins:
com.intellij.resharper.HeapAllocationsViewer (2024.3.0)
com.jetbrains.rider.android (243.21565.191)
unoplatform (1.2.28)
Anything else we need to know?
N / A






Activity
jeromelaban commentedon Dec 11, 2024
Thanks for the report. Font scaling is implemented here:
uno/src/Uno.UI/Controls/PaintPool.Android.cs
Line 153 in 13630a7
which gets its values from here:
uno/src/Uno.UI/Extensions/ViewHelper.Android.cs
Line 86 in 13630a7
and
uno/src/Uno.UI/Extensions/ViewHelper.Android.cs
Line 107 in 13630a7
it may be that some android devices don't provide that value properly, or that a change in android broke this feature.
Can you try calling the
ViewHelper.RefreshFontScale()method to see if this helps? I was able to get the font size to change when restarting the app. It may be that:uno/src/Uno.UI/UI/Xaml/ApplicationActivity.Android.cs
Line 324 in 13630a7
does not get called when the system size changes.
csnazell commentedon Dec 12, 2024
I can confirm stopping and restarting the app picks up the new scale value.
I overrode
OnConfigurationChanged()on the activity as follows:It's definitely getting called by Android (stops at a break point) so
RaiseConfigurationChanges()should be being called. Manually callingViewHelper.RefreshFontScale()has no effect.The newConfig object's .fontScale property reads 1.29999995 at the +2 notch on the scale (cf 1.0 at the default) so this detail is available to the app.
Adding some additional debugging to investigate
RefreshFontScale():displayMetrics.Density= 2.625displayMetrics.ScaledDensity= 3.4124999FeatureConfiguration.Font.IgnoreTextScaleFactor= falseFeatureConfiguration.Font.MaximumTextScaleFactor= nullSo
_cachedScaleDensityshould be the same asdisplayMetrics.ScaledDensityIt looks like the UI isn't redrawing itself in response to these changes.
Side note:
There is a note in the Android docs indicating that the
ScaledDensityfield is deprecated as of API 34 (here}.[-]Accessibility Scaling Doesn't Work (Android)[/-][+]Accessibility Scaling Doesn't Work[/+]MartinZikmund commentedon Sep 3, 2025
This feature needs to be implemented across all Skia targets