How to make it a fixed size without being affected by user-configured character size on Android

Asked 2 years ago, Updated 2 years ago, 111 views

Android has the ability to change the character size to small, medium, large, or extra large on the user's side, but
When developing an application with Monaca, is there a way to make it a fixed size without being affected by the character size in the user settings?

Development
Monaca

実Actual >
Android 4.4.4


[How to try it]

Described below in html

<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, maximum-scale=1.0, user-scalable=yes">

css describes the following

body{
    - webkit-text-size-adjust: 100%;
}

android monaca css

2022-09-30 18:02

1 Answers

I usually use ionic and I don't use Monoca, but I think I can use this plug-in because it's the same cordova.
https://github.com/phonegap/phonegap-mobile-accessibility

A plug-in that can transparently retrieve terminal accessibility information.
An example implementation can be found at the following URL:
https://stackoverflow.com/questions/27003829/phonegap-ignore-font-size-display-setting-on-android
As for the example of ionic/AngularJS, if it's AngularJS+Onsen UI, I think it's better to write it in ons.ready.

Also, it may not have much to do with this matter, but target-densitydpi=device-dpi seems to have many peculiarities (it appears when you google it).
As you may know, just in case...


2022-09-30 18:02

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.