Titanium JIRA Archive
Appcelerator Community (AC)

[AC-528] Appcelerator on android 5.x don't prevent system font size change

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionNeeds more info
Resolution Date2015-12-07T09:21:00.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsStudio
Labelsandroid, fontSize
ReporterToni Sanjuan
AssigneeShak Hossain
Created2015-12-04T11:20:12.000+0000
Updated2020-02-21T06:43:10.000+0000

Description

I have found a strange behavior of the application text size when I change the system font size settings of iOs or Android configurtion and after that open my Appcelerator Studio application. On older Android versions the system wide font size setting on Android was ignored by Titanium but in newer Android versions it is not In iOS and Android < 5.x it works fine for me. Always I can see fonts without scale. On Android 5.x text inside a WebView and other components like a AlertDialog or TextField, I notice a scaled font size. I want the app respect text size, prevent the OS settings change. I don't know why on Android 5.x don't have the same behavior. The problem occurs when I change system font size from Android Configuration. When I open the app after change it, on Android 5.x change the app font size and lose structure of my design I don't understand this different behaviour and maybe should be there a configuration parameter to avoid this. I try to get de size of an alert text trying to check the change but It's no possible. If it not posible to avoid this at least should be something to check if system font size has changed and show an alert to the user. I already try to set ti.ui.defaultunit on "dp" or other values with the same results. The Label component don't change the font size in any case.

Comments

  1. Jebun Naher 2015-12-06

    Hello [~asanjuan], Please provide a reproducible test case and steps to reproduce the issue that you observed, also attach your working environment details. Thanks.
  2. Toni Sanjuan 2015-12-09

    On Android 5.x creating a appcelerator studio application. Create a Window. Create an AlertDialog with title and message. Show the AlertDialog. Install and open the applicaction with different android system font size (change it on Settings->Display -> Font ->Font Size). You can see that title and message size changed (not in android < 5 or iOS) Add a label in AlertDialog.androidView. The size of the label don't change.
  3. Toni Sanjuan 2015-12-15

    I sent a test case about this problem some days ago. Could you reopen the issue? and if it posible tell me a solution? Thanks.
  4. Jignesh Kasundra 2020-02-21

    Hi have you find any solution ? I am also facing the same issue

JSON Source