In Android 4.0, the system can set a large font to display.ProgramThere will be layout disorder. The solution is to modify the fontscale value,CodeAs follows:
Resources resource = getresources ();
Configuration c = res. getconfiguration ();
C. fontscale = 1.0;
Res. updateconfiguration (C, resource. getdisplaymetrics ());
We recommend that you put this method in the onresume method. This ensures that the font size of the specified font can still be displayed after the program is started, is returned to the background, and the font size is changed back to the program. Fontscale default value is 1, General 4.0 set the font to a large size after the value will be 1.3, the value of reference: http://d.hatena.ne.jp/baroqueworksdev/20111029/1319879629 description:
Font size: Small
10-29 08:49:51. 004: I/activitymanager (85): config changed :{0.85310mcc260mnc en_us layoutdir = 0 sw320dp w320dp h480dp nrml port finger QWERTY/V
Tball/V s.8}
Font size: normal
10-29 08:48:50. 174: I/activitymanager (85): config changed :{1.0310mcc260mnc en_us layoutdir = 0 sw320dp w320dp h480dp nrml port finger QWERTY/V
Tball/V s.5}
Font size: Large
10-29 08:50:37. 494: I/activitymanager (85): config changed :{1.15310mcc260mnc en_us layoutdir = 0 sw320dp w320dp h480dp nrml port finger QWERTY/V
Tball/V s.9}
Font size: Extra Large
10-29 08:51:19. 314: I/activitymanager (85): config changed :{1.3310mcc260mnc en_us layoutdir = 0 sw320dp w320dp h480dp nrml port finger QWERTY/V
Tball/V s.10}