기술참고자료/Android
<TextView>에서의 줄간격 설정하기
농사꾼봉팔
2011. 4. 20. 10:41
일반적인 TextView

lineSpacingExtra의 설정시
라인의 간격을 더하기로 계산한다.
[Text_height 값] + [LindSpacing 값]

lineSpacingMultiplier의 설정시
라인의 간격을 곱하기로 계산한다.
[ Text_height 값] * [ LindSpacing 값]

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/aticle_content" /> </LinearLayout> |

lineSpacingExtra의 설정시
라인의 간격을 더하기로 계산한다.
[Text_height 값] + [LindSpacing 값]
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/aticle_content" android:lineSpacingExtra="15dip" /> </LinearLayout> |

lineSpacingMultiplier의 설정시
라인의 간격을 곱하기로 계산한다.
[ Text_height 값] * [ LindSpacing 값]
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/aticle_content" android:lineSpacingMultiplier="2.5" /> </LinearLayout> |
