Open s2405330 opened 6 years ago
嵌套滚动 demo 中有例子的,例子-潜逃滚动-整体嵌套,好好对比一下,你提供的代码也没看出什么问题
用在CoordinatorLayout外部的时候 为什么不能加载更多了: NestedViewPager 嵌套 ("ViewPager", NestedScrollExampleFragmentViewPager.class); Demo 里边是用adaprer 实现了上拉 操作。 请看我的问题布局代码,我想实现,在在外层实现下拉刷新,然后,根据viewpager 里边的数据自动加载更多。 <?xml version="1.0" encoding="utf-8"?> <com.zhy.autolayout.AutoLinearLayout 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" android:orientation="vertical">
<com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id="@+id/swipe_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
app:srlEnableAutoLoadMore="false"
app:srlEnableFooterTranslationContent="true">
<com.scwang.smartrefresh.header.MaterialHeader
android:layout_width="match_parent"
android:layout_height="wrap_content">
</com.scwang.smartrefresh.header.MaterialHeader>
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapse_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
app:contentScrim="@android:color/transparent"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<include layout="@layout/include_sm_header" />
<include layout="@layout/include_title_sm" />
<com.rainxing.shzzzfd.mvp.weiget.tablayout.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_gravity="bottom|center"
android:background="@android:color/white"
android:gravity="center"
app:tabGravity="center"
app:tabIndicatorColor="@color/color_2A67FF"
app:tabIndicatorHeight="3dp"
app:tabMode="fixed"
app:tabSelectedTextColor="@android:color/black"
app:tabTextAppearance="@style/tab_appearance_sm"
app:tabTextColor="@color/color_333333" />
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.view.ViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</android.support.design.widget.CoordinatorLayout>
<com.scwang.smartrefresh.header.MaterialHeader
android:layout_width="match_parent"
android:layout_height="wrap_content">
</com.scwang.smartrefresh.header.MaterialHeader>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
</com.zhy.autolayout.AutoLinearLayout>
现在的问题就是底部控件不显示,无法加载更多。
同样问题。
我也是SmartRefreshLayout嵌套CoordinatorLayout不能实现加载更多 @liuxuesong001 @wjk2813 请问解决了吗
我是SmartRefreshLayout嵌套CoordinatorLayout, CoordinatorLayout最下面放的recyclerview
问题加一
同样问题,SmartRefreshLayout嵌套CoordinatorLayout, CoordinatorLayout最下面放的一个FrameLayout,用来动态替换成Fragment显示列表,不能加载更多,应该是嵌套的问题,你们有解决的吗
如题
这是布局代码 `<com.scwang.smartrefresh.layout.SmartRefreshLayout 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:id="@+id/refreshLayout" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" app:srlAccentColor="@android:color/white" app:srlPrimaryColor="@android:color/holo_green_light">
</com.scwang.smartrefresh.layout.SmartRefreshLayout>`
activity中的代码是这样的
mRefreshLayout = (RefreshLayout) findViewById(refreshLayout); mRefreshLayout.setOnRefreshLoadMoreListener(this); mRefreshLayout.setRefreshHeader(new ClassicsHeader(this)); mRefreshLayout.setRefreshFooter(new ClassicsFooter(this));