Android system transplantation and debugging ------- & gt; how to modify the default font size of Android and set the font size ratio

Source: Internet
Author: User

Because I changed the ro. sf. LCD _density value from 160 to 120, the font of the entire system became very small. Therefore, you need to increase the font size, and the values of the four options in the settings --> display --> font size must be larger. The idea I thought of was to increase the font's Zoom ratio. below is my modification steps. 1. Modify the default font size. Step 1: Modify frameworks/base/core/java/android/content/res/Configuration. in the java file, the setToDefaults () method is used to adjust the default font scaling ratio to 1.35f, that is, to modify the fontScale attribute [java] Public void setToDefaults () {fontScale = 1.35f; // default value is 1 mcc = mnc = 0 ;....} 2. Modify Settings --> display --> four option values of the font size. Step 2: vim packages/apps/Settings/res/values/arrays. xml and vim packages/apps/Settings/res/values-sw600dp/arrays. the values of the four options are shown in xml, small, normal, large, and oversized [html] <pre name = "code" class = "html"> <string-array name = "entryvalues_font_size" translatable = "false"> <item> 1.4 </item> <item> 1.45 </item> <item> 1.5 </item> <item> 1.55 </item> </string-array> </ pre> <br> Step 3: compile the frameworks module [html]. /mk mbk77_twn_cu_jb mm frameworks/Step4: Compile the packages module [html]. /mk mbk77_twn_cu_jb mm packages/Step5: Update systemimage [html]. /mk mbk77_twn_cu_jb systemimage Step6: copy the generated file to the specified directory (Getimag. sh is a batch file used to copy files. You can write it yourself.) [html]. /Getimag. sh

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.