android - Word spliting in TextView -
i'm using textview show messages in app. messages contains html tags i'm using textview.settext(html.fromhtml(message)). there issue this. concrete words splitting in 2 lines shown below.
i need words not split , behave textview.settext(message).
textview definition:
<textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="@dimen/padding" android:layout_margintop="@dimen/margintop" android:layout_marginbottom="@dimen/marginbottom" android:layout_marginleft="0dp" android:layout_marginright="@dimen/marginright" android:gravity="left" android:shadowcolor="@color/textshadow" android:shadowdx="1" android:shadowdy="1" android:text="msg" android:textcolor="@android:color/black" android:textcolorlink="@android:color/black" android:background="@drawable/background" android:textsize="@dimen/textsize" />
you intentionally telling android not split across words, using non-breaking space ( ). replace actual spaces.
android textview android-textview
No comments:
Post a Comment