[setLineSpacing](https://developer.android.com/reference/android/widget/TextView.html#setLineSpacing(float,float))在預棒棒糖中不起作用。預棒棒糖線間距實際上也會影響線列的線高。修改線條之間的間距
前棒棒堂:
棒棒糖及更高版本:
有沒有人發現了一個解決方案?一個可能的解決方案可以定心內線文本,like css:
代碼:
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello \n World!"
android:lineSpacingMultiplier="2"/>
你c一個使用特定的字體和大小在xml中定義如下:android:focusable =「true」 android:fontFamily =「sans-serif」 android:textStyle =「bold」 android:typeface =「normal」android:textSize = 「25dp」根據您的選擇 –
'android:textSize'不適合我,因爲我需要行間距 – neworld
請分享您的代碼,我需要看看您使用的是什麼。 –