我有一个TextView
很长的文字。在图形布局中,它显示了很好的换行文本,但是当我运行它时,它不会换行。这是我的设计代码
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:layout_marginLeft="5dp"
android:background="#ffffff" >
<RelativeLayout
android:id="@+id/layout_title"
style="@style/dialog_header" >
<ImageView
android:id="@+id/image_title"
style="@style/dialog_header_image"
android:contentDescription="@string/update_reply"
android:src="@drawable/compose" />
<TextView
android:id="@+id/txt_title"
style="@style/dialog_header_title"
android:layout_toRightOf="@+id/image_title" />
</RelativeLayout>
<ScrollView
android:id="@+id/layout_message"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/layout_title"
android:fadingEdge="none"
android:fillViewport="true" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="10dp" >
<TextView
android:id="@+id/txt_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minHeight="130dp"
android:text="Don't work too hard to give yourself the best of everything, instead make a greater effort to give God the best of yourself." />
</LinearLayout>
</ScrollView>
<LinearLayout
android:id="@+id/button_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/layout_message" >
<Button
android:id="@+id/btn_reply"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/reply" />
<Button
android:id="@+id/btn_forward"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/forward" />
</LinearLayout>
</RelativeLayout>
我想显示这个,但它只显示一行