android – 我可以像这样创建一个nestedScroll布局吗?

我认为它可以通过nestedScrollingChild nestedScrollingParent来实现.

但我无法理解他们.谁可以帮助我!

产品经理坚持设计.

ScrollView包含LinearLayout,“TabLayout”和ViewPager.

ViewPager包含2个包含RecyclerView的片段或仅包含2个RecyclerView.

当ScrollView滚动到Bottom时,RecyclerView可以滚动到Bottom.

当RecyclerView滚动到Top时,ScrollView可以滚动到Top.

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent">
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />
        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />
        <TextView
            android:layout_width="match_parent"
            android:layout_height="1000dp" />
        <TableLayout
            android:layout_width="match_parent"
            android:layout_height="60dp"></TableLayout>
        <android.support.v4.view.ViewPager
            android:layout_width="match_parent"
            android:layout_height="match_parent"></android.support.v4.view.ViewPager>
    </LinearLayout>
</ScrollView>

解决方法

只需将ScrollView更改为android.support.v4.widget.nestedScrollView即可

如果不起作用,请发布您的xml

相关文章

这篇“android轻量级无侵入式管理数据库自动升级组件怎么实现...
今天小编给大家分享一下Android实现自定义圆形进度条的常用方...
这篇文章主要讲解了“Android如何解决字符对齐问题”,文中的...
这篇文章主要介绍“Android岛屿数量算法怎么使用”的相关知识...
本篇内容主要讲解“Android如何开发MQTT协议的模型及通信”,...
本文小编为大家详细介绍“Android数据压缩的方法是什么”,内...