We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The specified child already has a parent. You must call removeView() on the child's parent first.
at com.scu.miomin.shswiperefresh.core.SHSwipeRefreshLayout.setGuidanceView(SHSwipeRefreshLayout.java:217) at com.scu.miomin.shswiperefresh.core.SHSwipeRefreshLayout.onAttachedToWindow(SHSwipeRefreshLayout.java:202) 我用途是一个tablayout+viewpager+recyclerview 做的联动下拉刷新,在viewpager二次滑动时(既首次滑动某到某viewpager是没问题,例如从pager1滑动到pager2,pager2滑动到pager1),会出现这个问题。 因为首次滑动正常排除了我布局的问题,感觉是不是说在销毁的时候,没有移除父view;; private void setGuidanceView() { // SetUp HeaderView LayoutParams lp = new LayoutParams(LayoutParams.MATCH_PARENT, 0); if (headerView.getParent()==null) { headerView.setStartEndTrim(0, 0.75f); headerView.setText(mRefreshDefaulText); headerView.setTextColor(mGuidanceViewTextColor); headerView.setBackgroundColor(mGuidanceViewBgColor); headerView.setProgressBgColor(mProgressBgColor); headerView.setProgressColor(mProgressColor); addView(headerView, lp); }
// SetUp FooterView if (footerView.getParent()==null) { lp = new LayoutParams(LayoutParams.MATCH_PARENT, 0); lp.gravity = Gravity.BOTTOM; footerView.setStartEndTrim(0.5f, 1.25f); footerView.setText(mLoadDefaulText); footerView.setTextColor(mGuidanceViewTextColor); footerView.setBackgroundColor(mGuidanceViewBgColor); footerView.setProgressBgColor(mProgressBgColor); footerView.setProgressColor(mProgressColor); addView(footerView, lp); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The specified child already has a parent. You must call removeView() on the child's parent first.
at com.scu.miomin.shswiperefresh.core.SHSwipeRefreshLayout.setGuidanceView(SHSwipeRefreshLayout.java:217)
at com.scu.miomin.shswiperefresh.core.SHSwipeRefreshLayout.onAttachedToWindow(SHSwipeRefreshLayout.java:202)
我用途是一个tablayout+viewpager+recyclerview 做的联动下拉刷新,在viewpager二次滑动时(既首次滑动某到某viewpager是没问题,例如从pager1滑动到pager2,pager2滑动到pager1),会出现这个问题。
因为首次滑动正常排除了我布局的问题,感觉是不是说在销毁的时候,没有移除父view;;
private void setGuidanceView() {
// SetUp HeaderView
LayoutParams lp = new LayoutParams(LayoutParams.MATCH_PARENT, 0);
if (headerView.getParent()==null)
{
headerView.setStartEndTrim(0, 0.75f);
headerView.setText(mRefreshDefaulText);
headerView.setTextColor(mGuidanceViewTextColor);
headerView.setBackgroundColor(mGuidanceViewBgColor);
headerView.setProgressBgColor(mProgressBgColor);
headerView.setProgressColor(mProgressColor);
addView(headerView, lp);
}
The text was updated successfully, but these errors were encountered: