you can look into android:lineSpacingExtra
and apply it to your XML
Additional Info is on this page
or the related method public void setLineSpacing (float add, float mult)
Adding android:lineSpacingMultiplier="0.8"
can make the line spacing to 80%.
If you want padding between text try LineSpacingExtra="10dp"
<TextView
android:layout_width="match_parent"
android:layout_height="180dp"
android:lineSpacingExtra="10dp"/>
This supplemental answer shows the effect of changing the line spacing.
You can set the multiplier and/or extra spacing with
textView.setLineSpacing(float add, float mult)
Or you can get the values with
int lineHeight = textView.getLineHeight();
float add = tvSampleText.getLineSpacingExtra(); // API 16+
float mult = tvSampleText.getLineSpacingMultiplier(); // API 16+
where the formula is
lineHeight = fontMetricsLineHeight * mult + add
The default multiplier is 1
and the default extra spacing is 0
.
You can use TextView.setLineSpacing(n,m)
function.
Source: Stackoverflow.com