微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

NestedScrollView被截断

如何解决NestedScrollView被截断

我有一个布局:

Flask==1.1.1
flask_socketio==4.3.1

任务:我需要删除Linear <?xml version="1.0" encoding="utf-8"?> <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"> <FrameLayout android:id="@+id/payment_bottom_sheet_id" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/white_color" app:layout_anchorGravity="bottom"> <LinearLayout android:id="@+id/header_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="top" android:elevation="1dp" android:orientation="vertical" android:visibility="gone" app:layout_constraintBottom_toTopOf="@id/nested_scroll_view" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintStart_toStartOf="parent" /> <androidx.core.widget.nestedScrollView android:id="@+id/nested_scroll_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/margin_32x" android:layout_marginBottom="1dp" android:background="@android:color/transparent" android:clipToPadding="false" android:descendantFocusability="afterDescendants" android:fadeScrollbars="true" android:fadingEdgeLength="10dp" android:requiresFadingEdge="vertical" android:scrollbars="vertical" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintStart_toStartOf="parent"> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <LinearLayout android:id="@+id/body_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/rounded_dialog" android:backgroundTint="@color/white_color" android:nestedScrollingEnabled="false" android:orientation="vertical"> </LinearLayout> <View **--> need to remove this view** android:id="@+id/padding_view" android:layout_width="match_parent" android:layout_height="60dp" android:layout_below="@+id/body_container" android:background="@android:color/transparent" android:visibility="gone" /> </RelativeLayout> </androidx.core.widget.nestedScrollView> </FrameLayout> <LinearLayout android:id="@+id/footer_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/body_container" android:layout_gravity="bottom" android:background="@color/white_color" android:orientation="vertical" android:paddingTop="4dp" android:visibility="gone" /> </androidx.coordinatorlayout.widget.CoordinatorLayout> 下面的View id="@+id/padding_view",它的高度是60dp。此LinearLayout位于nestedScrollView id/body_container中。

问题:删除此视图时,id/nested_scroll_view中的内容被截断了。含义id/body_container(是我的按钮的容器)与id/footer_container的末尾重叠。我是否在nestedScrollView中缺少某些属性?有什么建议吗?起初真的很固执于此,似乎是一个很简单的问题...

我知道id/body_container中将设置可见性,但不会影响可见性。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。