滚动视图 - 无法向下滚动

时间:2018-05-11 07:15:46

标签: android android-fragments android-scrollview android-relativelayout

我设计了一个包含教育信息的布局文件,之前的信息不适合屏幕,所以我添加了滚动视图。我可以向下滚动屏幕但不完全。我尝试了putt scrollView所有相对布局的顶部,但它没有完全滚动,我尝试enter link description here但无法解决我的问题。

需要帮助吗?

fragment_education.xml     

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="@dimen/slide_title"
        android:layout_marginLeft="10dp"
        android:layout_marginRight="10dp"
        android:layout_marginTop="@dimen/slide_title"
        android:background="@color/Blue"
        android:paddingLeft="@dimen/slide_title">

        <RelativeLayout
            android:id="@+id/be_details"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp">

            <TextView
                android:id="@+id/be_year"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="2016"
                android:textSize="@dimen/slide_title"
                android:textStyle="bold" />

            <TextView
                android:id="@+id/college"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="@dimen/slide_title"
                android:layout_toRightOf="@+id/be_year"
                android:text="SKIT,Banglore"
                android:textSize="20dp"
                android:textStyle="bold" />

            <TextView
                android:id="@+id/course"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/college"
                android:layout_marginLeft="@dimen/slide_title"
                android:layout_toRightOf="@+id/be_year"
                android:text="@string/course_detail"
                android:textColor="@color/lighter"
                android:textSize="20sp" />

        </RelativeLayout>

        <RelativeLayout
            android:id="@+id/th12_detail"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/be_details"
            android:layout_marginTop="@dimen/slide_title">

            <TextView
                android:id="@+id/th12_year"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="2012"
                android:textSize="@dimen/slide_title"
                android:textStyle="bold" />

            <TextView
                android:id="@+id/th12_college"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="@dimen/slide_title"
                android:layout_toRightOf="@+id/th12_year"
                android:text="SLIC,Rampur"
                android:textSize="20dp"
                android:textStyle="bold" />

            <TextView
                android:id="@+id/th12_course"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/th12_college"
                android:layout_marginLeft="@dimen/slide_title"
                android:layout_toRightOf="@id/th12_year"
                android:text="@string/th12_details"
                android:textColor="@color/lighter"
                android:textSize="20sp" />
        </RelativeLayout>

        <RelativeLayout
            android:id="@+id/school_detail"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/th12_detail"
            android:layout_marginTop="@dimen/slide_title">

            <TextView
                android:id="@+id/scl_year"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="2010"
                android:textSize="@dimen/slide_title"
                android:textStyle="bold" />

            <TextView
                android:id="@+id/scl_school"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="@dimen/slide_title"
                android:layout_toRightOf="@+id/scl_year"
                android:text="SRHS,Tanda"
                android:textSize="20dp"
                android:textStyle="bold" />

            <TextView
                android:id="@+id/scl_detail"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/scl_school"
                android:layout_marginLeft="@dimen/slide_title"
                android:layout_toRightOf="@id/scl_year"
                android:text="@string/school_details"
                android:textColor="@color/lighter"
                android:textSize="20sp" />


        </RelativeLayout>
    </RelativeLayout>


</ScrollView>

哪里出错了?

0 个答案:

没有答案