【发布时间】:2017-09-25 18:36:42
【问题描述】:
我有以下 xml,它下面有 Gridview 和 framelayout。 我的要求是如果我向上滚动屏幕整个屏幕应该滚动,但对我来说只有列表视图滚动
下面是xml文件:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:focusableInTouchMode="true"
android:paddingBottom="@dimen/activity_vertical_margin">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/time_card_header"
android:id="@+id/scrollView">
<GridView
android:id="@+id/timecard_grid"
android:layout_width="match_parent"
android:layout_height="130dp"
android:layout_margin="3dp"
android:fitsSystemWindows="true"
android:gravity="center_horizontal"
android:horizontalSpacing="1dp"
android:numColumns="3"
android:stretchMode="columnWidth"
android:verticalSpacing="1dp" />
</ScrollView>
<FrameLayout
android:id="@+id/timecard_reports"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:background="@color/white"
android:layout_below="@+id/scrollView"/>
</RelativeLayout
【问题讨论】:
标签: java android listview scrollview