【发布时间】:2015-08-10 16:35:11
【问题描述】:
我试图将多个TextViews 放在一个ScrollView 中,但是当我这样做时,它会使我的应用程序崩溃。如何将相同的文本放在彼此下方两次?
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
android:layout_below="@id/linear">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/lorem_ipsum"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/lorem_ipsum"/>
</ScrollView>
【问题讨论】:
-
你能发布你的完整的xml文件吗?
-
您只能将一个孩子放入
ScrollView,因此请使用LinearLayout或任何其他容器
标签: android xml textview scrollview lorem-ipsum