java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
Hi your layout manager is very good however i'm getting this error in private int fill(RecyclerView.Recycler recycler, int dy, boolean apply) { int delta = direction.layoutDirection * dy; // multiply the parallex factor if (apply) delta = (int) (delta * parallex); if (direction == LEFT) return fillFromLeft(recycler, delta); if (direction == RIGHT)
return fillFromRight(recycler, delta);
if (direction == TOP)
return fillFromTop(recycler, delta);
else return dy;
}
i can't reproduce this error. how did you find this error? just run the apk and that happened? it is sad , i will try to help
Actually the error doesn't occur at first run I'm using this inside a fragment and when I switch tab and come back again and click on any of its item I start a new activity and when I come back from that activity and then when I click on any of its items it is giving me this error. Do you have any suggestions on how I could eliminate this error..
On Tue 19 Jun, 2018 6:18 am HirayClay, [email protected] wrote:
i can't reproduce this error. how did you find this error? just run the apk and that happened? it is sad , i will try to help
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/HirayClay/StackLayoutManager/issues/6#issuecomment-398239458, or mute the thread https://github.com/notifications/unsubscribe-auth/AjorBCEmRlPLV9AiGFaxT_yF3VZw5qQIks5t-EpegaJpZM4Urjxd .
of course ,you can add a defensive if statement “if (view.getParent() == null) addView(view)” in fillFromLeft fillFromTop fillFromRight these three methods.
It is a 'shameless' workaround util i find why.Another truth—— I am a noob in android and this layout manager kind of sucks when you dig deep into RecyclerView:neckbeard:
I think you are a great developer because your layout manger has helped me a lot