看起來像spacingMult
通過將間距乘以提供的數字來更改間距,spacingAdd
將提供給原始間距值的數字與特定語言的額外間距中的因子相加。
如果Google沒有關於您感興趣的某些內容的文檔,那麼查看源代碼中的註釋有時會很有幫助。例如,如果查看StaticLayout.java
文件,您將看到構造函數調用另一個方法,其中參數爲spacingMult
和spacingAdd
作爲該方法的參數。這個方法的評論如下:
/**
* Set line spacing parameters. The default is 0.0 for {@code spacingAdd}
* and 1.0 for {@code spacingMult}.
*
* @param spacingAdd line spacing add
* @param spacingMult line spacing multiplier
* @return this builder, useful for chaining
* @see android.widget.TextView#setLineSpacing
*/
這裏是setLineSpacing()
他們中提到的評論。
/**
* Sets line spacing for this TextView. Each line will have its height
* multiplied by <code>mult</code> and have <code>add</code> added to it.
*
* @attr ref android.R.styleable#TextView_lineSpacingExtra
* @attr ref android.R.styleable#TextView_lineSpacingMultiplier
*/
同樣爲includePad
:
/**
* Set whether to include extra space beyond font ascent and descent (which is
* needed to avoid clipping in some languages, such as Arabic and Kannada). The
* default is {@code true}.
*
* @param includePad whether to include padding
* @return this builder, useful for chaining
* @see android.widget.TextView#setIncludeFontPadding
*/
哦一個很好的提示,我應該嘗試更多的閱讀,謝謝 –