使用android Studio滚动视图

使用android Studio滚动视图,android,xml,android-studio,Android,Xml,Android Studio,你好,stack Over Flow社区,我是新来的,也是android Studio的新手,所以,如果我事先写错了什么,请告诉我。我对android中的滚动视图有疑问,如下所示 1) 如下图所示,在android Studio中使用滚动视图后,在滚动视图或水平滚动视图填满屏幕后,剩余的组件在屏幕上不可见,只能使用组件树窗口或Xml编辑器进行修改或编辑。我是否可以通过增加屏幕大小,或者在屏幕上滚动屏幕本身。不确定这是否适用于您的情况,但它对我的项目产生了奇迹 <RelativeLayout

你好,stack Over Flow社区,我是新来的,也是android Studio的新手,所以,如果我事先写错了什么,请告诉我。我对android中的滚动视图有疑问,如下所示


1) 如下图所示,在android Studio中使用滚动视图后,在滚动视图或水平滚动视图填满屏幕后,剩余的组件在屏幕上不可见,只能使用组件树窗口或Xml编辑器进行修改或编辑。我是否可以通过增加屏幕大小,或者在屏幕上滚动屏幕本身。

不确定这是否适用于您的情况,但它对我的项目产生了奇迹

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:background="#ffffff">

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fillViewport="false"
        android:layout_margin="10dp"
        android:id="@+id/scrollView">

        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:weightSum="1"
            android:layout_centerVertical="true"
            android:layout_alignLeft="@+id/scrollView"
            android:layout_alignStart="@+id/scrollView">

             //PLACE YOUR ELEMENT/s HERE INSIDE LINEAR_LAYOUT.


        </LinearLayout>
    </ScrollView>
</RelativeLayout>

//将您的元素放置在线性布局中。
没有你的代码,我不能真正测试它,但我一直在使用这种格式的我的卷轴和它的工作到目前为止^^


让我知道它是否有效,也许我可以帮你找出一个

不确定这在你的情况下是否有效,但它对我的项目产生了奇迹

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:background="#ffffff">

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fillViewport="false"
        android:layout_margin="10dp"
        android:id="@+id/scrollView">

        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:weightSum="1"
            android:layout_centerVertical="true"
            android:layout_alignLeft="@+id/scrollView"
            android:layout_alignStart="@+id/scrollView">

             //PLACE YOUR ELEMENT/s HERE INSIDE LINEAR_LAYOUT.


        </LinearLayout>
    </ScrollView>
</RelativeLayout>

//将您的元素放置在线性布局中。
没有你的代码,我不能真正测试它,但我一直在使用这种格式的我的卷轴和它的工作到目前为止^^


让我知道它是否有效,也许我可以帮你找出一个

发布你的xml代码,请发布你的xml代码