Code example for View

Methods: getContext

0
    } 
 
    public PopupWindow(View contentView, int width, int height, boolean focusable) {
        if (contentView != null) {
            mContext = contentView.getContext();
            mWindowManager = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
        } 
        setContentView(contentView);
        setWidth(width);
        setHeight(height);
        setFocusable(focusable);
    } 
 
    private int computeAnimationResource() { 
        if (mAnimationStyle == -1) {
            if (mIsDropdown) {
                return mAboveAnchor ? R.style.Holo_Animation_DropDownUp
                        : R.style.Holo_Animation_DropDownDown; 
            } 
            return 0; 
        }