Android realizes the double line display effect of desktop icon text of the system

  • 2021-10-16 02:50:02
  • OfStack

1. The length of the application name is not 1, and 1 line may not be displayed completely, requiring multiple lines to be displayed. Because the space of Launcher is limited, especially when the screen is horizontal, the space reserved for icons is very small, so it is not recommended to display multiple lines. If 1 must be displayed in multiple lines, we suggest displaying at most two lines under the vertical screen and keeping a single line under the horizontal screen

2. Configure properties (mine has no configuration properties)

1. Vertical screen

In the path: packages\ apps\ Launcher3\ res\ values\ config.xml

Add or modify to:

false
2

Turn off single line display under vertical screen, and set the maximum number of display lines to 2 lines

2. Horizontal screen

In the path: packages\ apps\ Launcher3\ res\ values-land\ config.xml

true

Under the horizontal screen, it defaults to single-line display

3. Use the above attributes

1. The above icons are all inherited from the style BaseIcon. Please navigate to the following

Path: packages\ apps\ Launcher3\ res\ values\ styles.xml

2. The revised contents are as follows:

Through the above modification, the double-line display of icon name under the vertical screen and the single-line display on the horizontal screen can be realized.

Summarize


Related articles: