【发布时间】:2015-06-04 17:02:02
【问题描述】:
我有一个 LinearLayout,它以编程方式放入了很多 TextView。我的意思是说它超出了我的屏幕底部。我想使用 ScrollView 来允许用户滚动到屏幕之外并查看 TextView 的其余部分。这是我目前的activity_main.xml:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:id="@+id/ll"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="61dp"
android:orientation="vertical" >
</LinearLayout>
</ScrollView>
任何帮助将不胜感激!谢谢!
【问题讨论】:
-
太棒了!但是您遇到的具体问题是什么?
-
首先使用 match_parent 属性作为线性布局的高度和宽度......然后显示你的代码,这样我们就可以知道你尝试了什么......
-
使用 match_parent 作为 ScrollView 的高度。