Code example for WindowManager

Methods: getDefaultDisplay

0
        setOutsideTouchable(true);
        setWidth(WindowManager.LayoutParams.WRAP_CONTENT);
        setHeight(WindowManager.LayoutParams.WRAP_CONTENT);
 
        final WindowManager windowManager = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
        mScreenWidth = windowManager.getDefaultDisplay().getWidth();
        mScreenHeight = windowManager.getDefaultDisplay().getHeight();
    } 
 
    /** 
     * Equivalent to {@link PopupWindow#setContentView(View)} but with a layout 
     * identifier. 
     *  
     * @param layoutId The layout identifier of the view to use. 
     */ 
    public void setContentView(int layoutId) {
        setContentView(LayoutInflater.from(mContext).inflate(layoutId, null));
    } 
 
    private void initializeDefault() { 
        mDismissOnClick = true;