xml文件中給TextView添加:android
android:lineSpacingExtra="10dp"// 行間距測試
android:lineSpacingMultiplier="1.5"// 倍數xml
代碼中:ip
tv.setLineSpacing(float add, float mult);// 參數:一、行間距 二、倍數ci
我測試的結果是:若是設置了倍數,行間距這個參數就不起做用了,也多是行間距的效果就不明顯了float