Android - ScrollView 使用小计 里面嵌套的View 如何设置全屏

设置ScrollView的属性android:fillViewport=”true” 即可

<?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="match_parent"
    android:fillViewport="true">


    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginBottom="20dp"
            android:background="@color/red"
            android:orientation="vertical">

        </LinearLayout>


    </FrameLayout>
</ScrollView>
posted @ 2018-01-20 14:46  趣学程序  阅读(159)  评论(0编辑  收藏  举报