今天自定义 TextView 样式时,发现字体的上下留了很多空白,严重影响了 UI 效果,百思不得其解。最后通过 Google ,发现了这个 API,设置其值为 false,完美解决了字体上下留白的问题。
API解释 :Leave enough room for ascenders and descenders instead of using the font ascent and descent strictly. (Normally true).
May be a boolean value, such as "true
" or "false
".