private void updateLayoutParamsForPosition(View anchor, WindowManager.LayoutParams p, int yOffset) {
        measureFloater();
        int measuredHeight = mPopupView.getMeasuredHeight();
        int paddingBottom = mPopupView.mMarker.getPaddingBottom();
        anchor.getLocationInWindow(mDrawingLocation);
        p.x = 0;
        p.y = mDrawingLocation[1] - measuredHeight + yOffset + paddingBottom;
        p.width = screenSize.x;
        p.height = measuredHeight;
    }
FORCE the popup window to be removed.
You typically calls this when the parent view is being removed from the window to avoid a Window Leak
caprice/ui/src/main/java/net/qiujuer/genius/ui/widget/popup/PopupIndicator.java