Retrieve line spacing in TextView - Android
问题 How can I retrieve the line spacing values (as currently applied to a piece of text) in a TextView ? In API 16 and above, the appropriate functions to call would be getLineSpacingExtra() and getLineSpacingMultiplier() . What are the appropriate functions for API version less than 16? 回答1: Looking at the source of TextView as given here shows that getLineHeight returns an integer for the line height whose 'formula' is given as: lineHeight = FastMath.round(mTextPaint.getFontMetricsInt(null) *