activity只使用LinearLayout,如果activity内容超过一屏,无法滚动查看下面的内容,
这时需在外面嵌套一个ScrollView。
<?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:scrollbars="vertical" android:fadingEdge="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:scrollbarStyle="outsideInset" android:scrollbars="vertical"> </LinearLayout> </ScrollView>