gpt4 book ai didi

android - Scrollview 没有在 Fragment 中完全滚动,Android

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:53:42 27 4
gpt4 key购买 nike

我是 android 的新手,正在开发应用程序,但我遇到了一个让我抓狂的错误。问题是它不会完全滚动,它会在屏幕外留下一个按钮,因此无法看到。

这是xml代码:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#d3d3d3"
android:orientation="vertical">

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

<LinearLayout
android:orientation="vertical"
android:background="@drawable/bg_sugerir"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:id="@+id/linearLayout"
>

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageView"
android:src="@drawable/pd"
android:layout_marginBottom="15dp"
/>

<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/editText"
android:layout_marginBottom="15dp"
android:hint="Nombre" />

<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="phone"
android:ems="10"
android:id="@+id/editText2"
android:layout_marginBottom="15dp"
android:hint="Teléfono" />

<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/editText4"
android:layout_marginBottom="15dp"
android:hint="Provincia" />

<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/editText3"
android:layout_marginBottom="15dp"
android:hint="Descripción" />

<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Enviar"
android:id="@+id/button" />


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

它显示以下内容,但如图所示,按钮不存在: notScrolling

希望大家帮帮我,谢谢

最佳答案

尝试用 android.support.v4.widget.NestedScrollView 替换 ScrollView

关于android - Scrollview 没有在 Fragment 中完全滚动,Android,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36230767/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com