Code example for PopupWindow

Methods: getContentViewsetWindowLayoutMode

0
            ((ViewGroup) subTextView.getParent()).removeView(subTextView);
        } 
    } 
 
    private void measure(RenderCoordinates coordinates) {
        mPopup.setWindowLayoutMode(
                ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
        mPopup.getContentView().setLayoutParams(
                new RelativeLayout.LayoutParams(
                        RelativeLayout.LayoutParams.WRAP_CONTENT,
                        RelativeLayout.LayoutParams.WRAP_CONTENT));
        mPopup.getContentView().measure(
                View.MeasureSpec.makeMeasureSpec(coordinates.getLastFrameViewportWidthPixInt(),
                        View.MeasureSpec.AT_MOST),
                View.MeasureSpec.makeMeasureSpec(coordinates.getLastFrameViewportHeightPixInt(),
                        View.MeasureSpec.AT_MOST));
    } 
 
    private float getAnchorOffset() { 
        final View root = mPopup.getContentView();
Contextual code suggestions in your IDE  Get Codota for Java