我有一个活动,其中包含一个滚动视图,并有一个两个孩子,但是当活动加载它不显示顶部的部分,并从gridview顶部开始!android scrollview不显示布局的顶部
<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/activityBackground"
tools:context="com.test.app.fragment.HomeFragment">
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="60dp"
android:background="@color/ColorPrimaryDark"/>
<com.test.app.util.ExpandableHeightGridView
android:id="@+id/homeNormalGridView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:numColumns="2"
android:padding="5dp"
android:stretchMode="columnWidth" />
</LinearLayout>
</ScrollView>
<fr.castorflex.android.circularprogressbar.CircularProgressBar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/homeProgress"
android:layout_width="80dp"
android:layout_height="80dp"
android:indeterminate="true"
app:cpb_color="@color/ColorPrimary"
app:cpb_max_sweep_angle="300"
app:cpb_min_sweep_angle="10"
app:cpb_rotation_speed="1.0"
app:cpb_stroke_width="4dp"
app:cpb_sweep_speed="1.0" />
</RelativeLayout>
,你看,我有GridView和RelativeLayout的滚动型作为一个孩子,但我没有任何想法,为什么RelativeLayout的是要躲起来!
你能给我们一些截图,让我们更好地理解它吗? – 2015-03-25 01:13:50
@nayoso它只是从gridview顶部开始,我必须向上滚动才能看到relativelayout! – user2549089 2015-03-25 01:17:06
但是在你向上滚动之后,你可以看到它,还是会反弹回来?相对布局是否在操作栏之下? – 2015-03-25 01:18:38