Baidu Geek Talk
Jan 20, 2021 · Mobile Development
Consistent TextView Line Spacing on Android: Analysis and Adaptation Solution
The article explains why Android TextView line spacing varies across devices due to mismatched FontMetrics calculations, and presents a low‑intrusion fix that uses a custom LineHeightSpan applied via an ETextView subclass to enforce a visual‑consistent line height equal to the text size on all screen resolutions.
AndroidCompatibilityLineSpacing
0 likes · 13 min read