Replies: 1 comment 1 reply
-
|
You didn't add it but we added it recently https://www.codenameone.com/blog/ios-density-scroll-and-accessibility/#uimanagerzoomfontsfactor |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm having an issue that I solved years ago, but I can't remember if I used a Codename One API Component or created a new one manually.
Here’s my problem: I created an app where users can zoom in and out of the text as they wish. This setting scales the text globally within the app. The layout is suitable for all screen sizes and orientations. However, some Labels and Buttons have text that cannot be enlarged too much; otherwise, the text won't fit in the available space. The solution is quite simple: the Component (derived from Label or Button) checks if the text fits within the dimensions imposed by the layout. If not, it progressively reduces the text size until it does. If I recall correctly, the code involves a loop of progressive resizing until the right size is found. It's not very efficient, but using it sparingly makes sense.
Did I create this component myself, or is it part of Codename One?
Beta Was this translation helpful? Give feedback.
All reactions