안드로이드 TextView는 원래 기본적으로 단어 단위로 줄바꿈이 된다고 알고있는데, 아래 코드로 작성했을 때 글자단위로 줄바꿈이 되네요 ㅠㅠ 단어단위로 알아서 줄바꿈이 되는 방법이 있을까요??
현재 출력 :
고구마 감자 피자 사과 바나나 아보카도 아스파라거스 토
마토 사과 딸기 오렌지
원하는 출력 :
고구마 감자 피자 사과 바나나 아모카도 아스파라거스
토마토 사과 딸기 오렌지 (토마토가 한 단어이므로 다음줄에 내려와서 출력해야함)
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="고구마 감자 피자 사과 바나나 아보카도 아스파라거스 토마토 사과 딸기 오렌지"
android:textSize="18dp" />
</LinearLayout>