Skip to content

Commit

Permalink
Merge pull request #9 from ParadiseHell/master
Browse files Browse the repository at this point in the history
BUG : The specified child already has a parent. You must call removeView() on the child's parent first.
  • Loading branch information
hluhovskyi authored Mar 20, 2018
2 parents 42cb24f + 0f1a6ed commit 6d1e952
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ public boolean onTouchEvent(MotionEvent event) {
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
if (mHoldingCircle.getParent() != null){
((ViewGroup)mHoldingCircle.getParent()).removeView(mHoldingCircle);
}
getDecorView().addView(mHoldingCircle, mHoldingDrawable.getIntrinsicWidth(), mHoldingDrawable.getIntrinsicHeight());
}

Expand Down

0 comments on commit 6d1e952

Please sign in to comment.