java - How to set a line spacing in a text of a TextView -


txt.settext("abc \n defgh"); 

i want have line spacing value. sample range 5 dp.

abc '5dp range' defgh 

take @ android:linespacingextra (https://developer.android.com/reference/android/widget/textview.html#attr_android:linespacingextra) , android:linespacingmultiplier (https://developer.android.com/reference/android/widget/textview.html#attr_android:linespacingmultiplier).

<textview     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:linespacingextra="5dp"     android:text="abc \n defgh"/> 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -