Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 按键上的按钮是挤压。为什么滚动不';不行?_Java_Android_Scrollview_Nestedscrollview - Fatal编程技术网

Java 按键上的按钮是挤压。为什么滚动不';不行?

Java 按键上的按钮是挤压。为什么滚动不';不行?,java,android,scrollview,nestedscrollview,Java,Android,Scrollview,Nestedscrollview,我有一个屏幕,键盘上有“下一步”按钮。我加了卷轴。如果键盘打开,空间不够,我们需要使用滚动键。但有一点空间滚动不出现,按钮被挤压 在清单中 <activity android:name=".activity.register.RegisterPhoneActivity" android:screenOrientation="portrait" android:windowSoftInputMode="stateVisible|adjustResize"

我有一个屏幕,键盘上有“下一步”按钮。我加了卷轴。如果键盘打开,空间不够,我们需要使用滚动键。但有一点空间滚动不出现,按钮被挤压

在清单中

<activity
    android:name=".activity.register.RegisterPhoneActivity"
    android:screenOrientation="portrait"
    android:windowSoftInputMode="stateVisible|adjustResize"
    />

activity\u register\u phone.xml

<?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        xmlns:tools="http://schemas.android.com/tools"
        android:orientation="vertical">

        <include layout="@layout/w_toolbar" />

        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:paddingTop="6dp"
            android:paddingLeft="@dimen/activity_horizontal_margin"
            android:paddingRight="@dimen/activity_horizontal_margin"
            android:paddingBottom="@dimen/activity_vertical_margin"
            android:fillViewport="true"
            android:scrollbars="vertical"
            >

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            >

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="top"
                    >

                    <com.devspark.robototextview.widget.RobotoTextView
                        android:id="@+id/badge"
                        android:layout_width="@dimen/size_badge"
                        android:layout_height="@dimen/size_badge"
                        android:textSize="@dimen/text.16"
                        android:background="@drawable/circle_tv"
                        android:gravity="center"
                        android:text="1"
                        app:typeface="roboto_regular"
                        />

                    <com.devspark.robototextview.widget.RobotoTextView
                        android:id="@+id/title"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="@dimen/margin_10"
                        android:textSize="@dimen/text.26"
                        android:text="@string/enter_your_number"
                        android:layout_centerVertical="true"
                        android:layout_toRightOf="@+id/badge"
                        app:typeface="roboto_light"
                        />

                </RelativeLayout>

                <com.devspark.robototextview.widget.RobotoTextView
                    android:id="@+id/description"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/margin_20"
                    android:gravity="left"
                    android:textSize="@dimen/text.15"
                    android:textColor="@color/secondary_text_color"
                    android:text="@string/register_phone_description"
                    app:typeface="roboto_regular"
                    />

                <com.devspark.robototextview.widget.RobotoEditText
                    android:id="@+id/et_username_phone"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="phone"
                    android:textSize="@dimen/text.24"
                    android:layout_marginTop="@dimen/margin_22"
                    android:background="@drawable/edt_bg_selector"
                    app:typeface="roboto_regular"
                    />

                <com.devspark.robototextview.widget.RobotoTextView
                    android:id="@+id/content_info"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/margin_6"
                    android:layout_marginLeft="@dimen/margin_15"
                    android:layout_marginRight="@dimen/margin_15"
                    android:gravity="center"
                    android:textColor="@color/url_grey_text_color"
                    android:textSize="@dimen/text.11"
                    app:typeface="roboto_regular"
                    tools:text="@string/register_phone_content_info"
                    />

            <FrameLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                >

                <com.devspark.robototextview.widget.RobotoButton
                    android:id="@+id/btn_next"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/margin_16"
                    android:layout_gravity="bottom"
                    android:text="@string/btn_register_next_step"
                    android:textSize="@dimen/text.15"
                    android:enabled="false"
                    style="@style/ButtonStyle"
                    app:typeface="roboto_medium"
                    />

            </FrameLayout>

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

移除调整大小


然后在ScrollView wrap_内容内设置线性布局高度,这样就不会挤压。

我需要调整大小为什么要在“框架布局”(即“匹配父对象”)中选择按钮删除该框架布局并仅使用该按钮可能会解决您的问题