Open printlybyte opened 4 years ago
遇到同样问题,层主解决了吗
问题解决了,看了源码,在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
MultipleStatusView 嵌套TwinklingRefreshLayout
<?xml version="1.0" encoding="utf-8"?> <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">
然后在fragment应用 外层是viewpager+tablayout 滑动几次就会空白