我有一个滚动视图内的线性布局,这是我的布局文件
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<!-- Other widgets go here -->
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<!-- Scroll view content -->
</ScrollView>
</LinearLayout>
我希望ScrolView的高度取决于它的内容-包装它,然而,如果这个高度使整个布局高度超过屏幕尺寸,它应该固定以适应屏幕的高度。怎样才能实现呢?
发布于 2015-08-30 20:17:53
将此作为属性添加到滚动视图中
android:fillViewport="true"
https://stackoverflow.com/questions/5179283
复制相似问题