Code example for View

Methods: getParent

0
        if (!mShowsDialog) {
            return; 
        } 
        View view = getView();
        if (view != null) {
            if (view.getParent() != null) {
                throw new IllegalStateException(
                        "DialogFragment can not be attached to a container view"); 
            } 
            if (mDialog instanceof AlertDialog) {
                ((AlertDialog) mDialog).setView(view);
            } else { 
                mDialog.setContentView(view);
            } 
        } 
        mDialog.setOwnerActivity(getActivity());
        mDialog.setCancelable(mCancelable);
        mDialog.setOnCancelListener(this);
        mDialog.setOnDismissListener(this);
        if (savedInstanceState != null) {
Experience pair programming with AI  Get Codota for Java