You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Autofit Width works great on iOS and on some Android phones that have a OS font size setting of certain defaults. If you change the OS font size setting the text doesn't size down the font enough to still fit.
Steps to Reproduce
Set a label to autofit = width.
Test this works on iOS and many Android phones with their default setting.
Change the Android OS font size setting to be higher than default.
Notice that the text doesn't fit anymore.
Expected Behavior
Text should auto size to fit the width of the control no matter what the OS font size setting is.
Actual Behavior
Text is not being down sized small enough to fit the control width.
Basic Information
Version with issue: 2.4.9
Last known good version: ?
IDE: Visual Studio 2022
Platform Target Frameworks:
iOS: 11 and later
Android: 5.x and later
Affected Devices:
Reproduction Link - a link to a small demo project that reproduces this issue
Any default project will exhibit this behavior. Just change the OS font size to a larger size and it will not automatically fit the width anymore.
Workaround
None
The text was updated successfully, but these errors were encountered:
Meanwhile... why you should not use auto-fit in the F9P:Label unless you desperately need to.
Autofit, when triggered, causes several successive layout recalculations. It is VERY expensive and can, for example, make your Collection view stutter when scrolling when you have about 10 of auto-fit labels.
It has some layout issues, including (but not limited to) the issue above.
I still use F9P:Label when (1) It is not in a Collection View (2) I need HtmlText rendering.
Based on my journey, I am able to avoid need for a dynamic font size by doing one of the following:
A) For long texts of variable length: Make grid row that contains label to have Auto-height and add ScrollView.
B) For most of static labels: Test on various emulators with different screen dimensions and find the font size that fits. If you are localizing, best of luck to you.
C) For single-line labels of variable length (in a Collection View item grid) - Either make a grid row to have Auto height OR use derived label class that makes text like this: "This is long labe..." with a tooltip that shows entire text. The implementation is not entirely trivial, but it doesn't require entire page to invalidate its layout 3-4 times (maybe even per label? I forgot, it was a while since I last looked into the source.)
The auto-fit is an ingenious solution for a flaw in the system, but it's a hack and as every hack it has its drawbacks. Still, kudos to @baskren for inventing it.
Description
Autofit Width works great on iOS and on some Android phones that have a OS font size setting of certain defaults. If you change the OS font size setting the text doesn't size down the font enough to still fit.
Steps to Reproduce
Expected Behavior
Text should auto size to fit the width of the control no matter what the OS font size setting is.
Actual Behavior
Text is not being down sized small enough to fit the control width.
Basic Information
Reproduction Link - a link to a small demo project that reproduces this issue
Any default project will exhibit this behavior. Just change the OS font size to a larger size and it will not automatically fit the width anymore.
Workaround
None
The text was updated successfully, but these errors were encountered: