MultipleStatusView icon indicating copy to clipboard operation
MultipleStatusView copied to clipboard

然后在fragment应用 外层是viewpager+tablayout 滑动几次就会空白

Open printlybyte opened this issue 6 years ago • 2 comments

MultipleStatusView 嵌套TwinklingRefreshLayout

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/layout" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/white"> <com.classic.common.MultipleStatusView android:id="@+id/include_multiple_status_view" android:layout_width="match_parent" android:layout_height="match_parent" app:emptyView="@layout/custom_empty_view" app:errorView="@layout/custom_error_view" app:loadingView="@layout/custom_loading_view" app:noNetworkView="@layout/custom_no_network_view"

    >

    <!--scrollview布局-->
    <com.lcodecore.tkrefreshlayout.TwinklingRefreshLayout
        android:id="@+id/include_refreshLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <!--列表布局-->
        <android.support.v7.widget.RecyclerView
            android:id="@+id/include_recyclerview"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_below="@+id/headview"
            android:background="#fff"
            android:focusableInTouchMode="false"
            android:overScrollMode="never"
            android:scrollbars="none" />

    </com.lcodecore.tkrefreshlayout.TwinklingRefreshLayout>
</com.classic.common.MultipleStatusView>

然后在fragment应用 外层是viewpager+tablayout 滑动几次就会空白

printlybyte avatar Dec 20 '19 05:12 printlybyte

遇到同样问题,层主解决了吗

Anima18 avatar Jan 08 '20 02:01 Anima18

问题解决了,看了源码,在onDetachedFromWindow做了清除视图工作,把这段代码注销掉就可以了

    protected void onDetachedFromWindow() {
        super.onDetachedFromWindow();
        /*clear(mEmptyView, mLoadingView, mErrorView, mNoNetworkView);
        if (!mOtherIds.isEmpty()) {
            mOtherIds.clear();
        }
        if (null != mOnRetryClickListener) {
            mOnRetryClickListener = null;
        }
        if (null != mViewStatusListener) {
            mViewStatusListener = null;
        }*/
    }```
@printlybyte 

Anima18 avatar Jan 09 '20 02:01 Anima18