Show the content of the PeekView by adding it to the android.R.id.content FrameLayout.
339729
public void show() {
        androidContentView.addView(this);

        // set the translations for the content view
        content.setTranslationX(distanceFromLeft);
        content.setTranslationY(distanceFromTop);

        // animate the alpha of the PeekView
        ObjectAnimator animator = ObjectAnimator.ofFloat(this, View.ALPHA, 0.0f, 1.0f);
        animator.addListener(new AnimatorEndListener() {
            @Override
            public void onAnimationEnd(Animator animator) {
                if (callbacks != null) {
                    callbacks.shown();
                }
            }
        });
        animator.setDuration(options.useFadeAnimation() ? ANIMATION_TIME : 0);
        animator.setInterpolator(INTERPOLATOR);
        animator.start();
    }
823963
public void setContentView(int layoutResId) {
        LayoutInflater layoutInflater = LayoutInflater.from(getActivity());
        View contentView = layoutInflater.inflate(layoutResId, null);
        setContentView(contentView);
    }
849354
public View makeRowView(NotificationBoard board, NotificationEntry entry, LayoutInflater inflater) {

        return inflater.inflate(R.layout.notification_board_row, null, false);
    }
901479
public static void showView(Activity context, int id) {
        if (context != null) {
            View view = context.findViewById(id);
            if (view != null) {
                view.setVisibility(View.VISIBLE);
            } else {
                Log.e("Caffeine", "View does not exist.  Could not show it.");
            }
        }
    }
1078527
private void createContent() {
        //if we have a customView use this
        if (mCustomView != null) {
            LinearLayout.LayoutParams contentParams = new LinearLayout.LayoutParams(
                    ViewGroup.LayoutParams.MATCH_PARENT,
                    ViewGroup.LayoutParams.MATCH_PARENT
            );
            contentParams.weight = 1f;
            mSliderLayout.addView(mCustomView, contentParams);
            return;
        }

        //set the shadow for the drawer
        if (Build.VERSION.SDK_INT < 21 && mDrawerLayout != null) {
            if (ViewCompat.getLayoutDirection(mRootView) == ViewCompat.LAYOUT_DIRECTION_LTR) {
                mDrawerLayout.setDrawerShadow(mDrawerGravity == GravityCompat.START ? R.drawable.material_drawer_shadow_right : R.drawable.material_drawer_shadow_left, mDrawerGravity);
            } else {
                mDrawerLayout.setDrawerShadow(mDrawerGravity == GravityCompat.START ? R.drawable.material_drawer_shadow_left : R.drawable.material_drawer_shadow_right, mDrawerGravity);
            }
        }

        // if we have an adapter (either by defining a custom one or the included one add a list :D
        View contentView;
        if (mRecyclerView == null) {
            contentView = LayoutInflater.from(mActivity).inflate(R.layout.material_drawer_recycler_view, mSliderLayout, false);
            mRecyclerView = (RecyclerView) contentView.findViewById(R.id.material_drawer_recycler_view);
            //set the itemAnimator
            mRecyclerView.setItemAnimator(mItemAnimator);
            //some style improvements on older devices
            mRecyclerView.setFadingEdgeLength(0);

            //set the drawing cache background to the same color as the slider to improve performance
            //mRecyclerView.setDrawingCacheBackgroundColor(UIUtils.getThemeColorFromAttrOrRes(mActivity, R.attr.material_drawer_background, R.color.material_drawer_background));
            mRecyclerView.setClipToPadding(false);
            //additional stuff
            mRecyclerView.setLayoutManager(mLayoutManager);

            int paddingTop = 0;
            if ((mDisplayBelowStatusBar == null || mDisplayBelowStatusBar) && !mSystemUIHidden) {
                paddingTop = UIUtils.getStatusBarHeight(mActivity);
            }
            int paddingBottom = 0;
            int orientation = mActivity.getResources().getConfiguration().orientation;
            if (((mTranslucentNavigationBar || mFullscreen) && Build.VERSION.SDK_INT >= 21) && !mSystemUIHidden
                    && (orientation == Configuration.ORIENTATION_PORTRAIT
                    || (orientation == Configuration.ORIENTATION_LANDSCAPE
                    && DrawerUIUtils.isSystemBarOnBottom(mActivity)))) {
                paddingBottom = UIUtils.getNavigationBarHeight(mActivity);
            }

            mRecyclerView.setPadding(0, paddingTop, 0, paddingBottom);
        } else {
            contentView = mRecyclerView;
        }

        LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
                ViewGroup.LayoutParams.MATCH_PARENT,
                ViewGroup.LayoutParams.MATCH_PARENT
        );
        params.weight = 1f;
        mSliderLayout.addView(contentView, params);

        if (mInnerShadow) {
            View innerShadow = mSliderLayout.findViewById(R.id.material_drawer_inner_shadow);
            innerShadow.setVisibility(View.VISIBLE);
            innerShadow.bringToFront();
            if (mDrawerGravity == GravityCompat.START) {
                innerShadow.setBackgroundResource(R.drawable.material_drawer_shadow_left);
            } else {
                innerShadow.setBackgroundResource(R.drawable.material_drawer_shadow_right);
            }
        }

        // set the background
        if (mSliderBackgroundColor != 0) {
            mSliderLayout.setBackgroundColor(mSliderBackgroundColor);
        } else if (mSliderBackgroundColorRes != -1) {
            mSliderLayout.setBackgroundColor(ContextCompat.getColor(mActivity, mSliderBackgroundColorRes));
        } else if (mSliderBackgroundDrawable != null) {
            UIUtils.setBackground(mSliderLayout, mSliderBackgroundDrawable);
        } else if (mSliderBackgroundDrawableRes != -1) {
            UIUtils.setBackground(mSliderLayout, mSliderBackgroundDrawableRes);
        }

        //handle the header
        DrawerUtils.handleHeaderView(this);

        //handle the footer
        DrawerUtils.handleFooterView(this, new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                IDrawerItem drawerItem = (IDrawerItem) v.getTag(R.id.material_drawer_item);
                DrawerUtils.onFooterDrawerItemClick(DrawerBuilder.this, drawerItem, v, true);
            }
        });

        //if MultiSelect is possible
        mAdapter.withMultiSelect(mMultiSelect);
        if (mMultiSelect) {
            mAdapter.withSelectOnLongClick(false);
            mAdapter.withAllowDeselection(true);
        }

        //set the adapter on the listView
        if (mAdapterWrapper == null) {
            mRecyclerView.setAdapter(mAdapter);
        } else {
            mRecyclerView.setAdapter(mAdapterWrapper);
        }

        //predefine selection (should be the first element
        if (mSelectedItemPosition == 0 && mSelectedItemIdentifier != 0L) {
            mSelectedItemPosition = DrawerUtils.getPositionByIdentifier(this, mSelectedItemIdentifier);
        }
        if (mHeaderView != null && mSelectedItemPosition == 0) {
            mSelectedItemPosition = 1;
        }
        mAdapter.deselect();
        mAdapter.select(mSelectedItemPosition);

        // add the onDrawerItemClickListener if set
        mAdapter.withOnClickListener(new OnClickListener<IDrawerItem>() {
            @Override
            public boolean onClick(final View view, IAdapter<IDrawerItem> adapter, final IDrawerItem item, final int position) {
                if (!(item != null && item instanceof Selectable && !item.isSelectable())) {
                    resetStickyFooterSelection();
                    mCurrentStickyFooterSelection = -1;
                }

                //call the listener
                boolean consumed = false;

                //call the item specific listener
                if (item instanceof AbstractDrawerItem && ((AbstractDrawerItem) item).getOnDrawerItemClickListener() != null) {
                    consumed = ((AbstractDrawerItem) item).getOnDrawerItemClickListener().onItemClick(view, position, item);
                }

                //call the drawer listener
                if (mOnDrawerItemClickListener != null) {
                    if (mDelayDrawerClickEvent > 0) {
                        new Handler().postDelayed(new Runnable() {
                            @Override
                            public void run() {
                                mOnDrawerItemClickListener.onItemClick(view, position, item);
                            }
                        }, mDelayDrawerClickEvent);
                    } else {
                        consumed = mOnDrawerItemClickListener.onItemClick(view, position, item);
                    }
                }

                //we have to notify the miniDrawer if existing, and if the event was not consumed yet
                if (!consumed && mMiniDrawer != null) {
                    consumed = mMiniDrawer.onItemClick(item);
                }

                //if we were a expandable item we consume the event closing makes no sense
                if (item instanceof IExpandable && ((IExpandable) item).getSubItems() != null) {
                    //we consume the event and want no further handling
                    return true;
                }


                if (!consumed) {
                    //close the drawer after click
                    closeDrawerDelayed();
                }

                return consumed;
            }
        });
        // add the onDrawerItemLongClickListener if set
        mAdapter.withOnLongClickListener(new OnLongClickListener<IDrawerItem>() {
            @Override
            public boolean onLongClick(View view, IAdapter<IDrawerItem> adapter, final IDrawerItem item, final int position) {
                if (mOnDrawerItemLongClickListener != null) {
                    return mOnDrawerItemLongClickListener.onItemLongClick(view, position, getDrawerItem(position));
                }
                return false;
            }
        });

        if (mRecyclerView != null) {
            mRecyclerView.scrollToPosition(0);
        }

        // try to restore all saved values again
        if (mSavedInstance != null) {
            if (!mAppended) {
                mAdapter.deselect();
                mAdapter.withSavedInstanceState(mSavedInstance, Drawer.BUNDLE_SELECTION);
                DrawerUtils.setStickyFooterSelection(this, mSavedInstance.getInt(Drawer.BUNDLE_STICKY_FOOTER_SELECTION, -1), null);
            } else {
                mAdapter.deselect();
                mAdapter.withSavedInstanceState(mSavedInstance, Drawer.BUNDLE_SELECTION_APPENDED);
                DrawerUtils.setStickyFooterSelection(this, mSavedInstance.getInt(Drawer.BUNDLE_STICKY_FOOTER_SELECTION_APPENDED, -1), null);
            }
        }

        // call initial onClick event to allow the dev to init the first view
        if (mFireInitialOnClick && mOnDrawerItemClickListener != null) {
            int selection = mAdapter.getSelections().size() == 0 ? -1 : mAdapter.getSelections().iterator().next();
            mOnDrawerItemClickListener.onItemClick(null, selection, getDrawerItem(selection));
        }
    }
1211301
def _view(self, filepath, format):
        """"""
        methodnames = [
            '_view_%s_%s' % (format, backend.PLATFORM),
            '_view_%s' % backend.PLATFORM,
        ]
        for name in methodnames:
            view_method = getattr(self, name, None)
            if view_method is not None:
                break
        else:
            raise RuntimeError('%r has no built-in viewer support for %r '
                'on %r platform' % (self.__class__, format, backend.PLATFORM))
        view_method(filepath)
257942
public static void showLoading(@NonNull View loadingView, @NonNull View contentView,
      @NonNull View errorView) {

    contentView.setVisibility(View.GONE);
    errorView.setVisibility(View.GONE);
    loadingView.setVisibility(View.VISIBLE);
  }
1337590
def show_view(self):
        
        if not self.build_info:
            def on_build_info(info):
                """ Make sure the build info is ready before we 
                display the view 
                
                """
                self.dp = info['DISPLAY_DENSITY']
                self.width = info['DISPLAY_WIDTH']
                self.height = info['DISPLAY_HEIGHT']
                self.orientation = ('square', 'portrait', 'landscape')[
                                    info['DISPLAY_ORIENTATION']]
                self.api_level = info['SDK_INT']
                self.build_info = info
                self._show_view()

            self.init_widget()
            self.widget.getBuildInfo().then(on_build_info)
        else:
            self._show_view()
673345
private void inflateView() {
        parentView = createParentView();
        view = createView();
        view.setOnFocusChangeListener(createFocusChangeListener());
        view.setBackgroundResource(R.drawable.validateable_view_background);
        setLineColor(getAccentColor());

        if (parentView != null) {
            parentView.addView(view, LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
            addView(parentView, LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
        } else {
            addView(view, LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
        }
    }
439952
private void inflateContentView() {
        contentContainer = rootView.findViewById(R.id.content_container);
        contentContainer.removeAllViews();

        if (customView != null) {
            contentContainer.setVisibility(View.VISIBLE);
            contentContainer.addView(customView);
        } else if (customViewId != -1) {
            contentContainer.setVisibility(View.VISIBLE);
            LayoutInflater layoutInflater = LayoutInflater.from(getContext());
            View view = layoutInflater.inflate(customViewId, contentContainer, false);
            contentContainer.addView(view);
        } else {
            LayoutInflater layoutInflater = LayoutInflater.from(getContext());
            View view = layoutInflater
                    .inflate(R.layout.bottom_sheet_grid_view, contentContainer, false);
            contentContainer.addView(view);
        }

        showGridView();
    }
1171035
private void parseViewInfo() {
        int rowsStart = -1;
        for (int i = responseContent.readerIndex(); i < responseContent.writerIndex() - 2; i++) {
            byte curr = responseContent.getByte(i);
            byte f1 = responseContent.getByte(i + 1);
            byte f2 = responseContent.getByte(i + 2);

            if (curr == '"' && f1 == 'r' && f2 == 'o') {
                rowsStart = i;
                break;
            }
        }

        if (rowsStart == -1) {
            return;
        }

        ByteBuf info = responseContent.readBytes(rowsStart - responseContent.readerIndex());
        int closingPointer = info.forEachByteDesc(new ByteBufProcessor() {
            @Override
            public boolean process(byte value) throws Exception {
                return value != ',';
            }
        });

        if (closingPointer > 0) {
            info.setByte(closingPointer, '}');
            viewInfoObservable.onNext(info);
        } else {
            //JVMCBC-360 don't forget to release the now unused info ByteBuf
            info.release();
            viewInfoObservable.onNext(Unpooled.EMPTY_BUFFER);
        }
        viewInfoObservable.onCompleted();
        viewParsingState = QUERY_STATE_ROWS;
    }
533215
def add_view(self, view):
        

        self.add_child(view)
        self.views.append(view)
351292
@OnClick(R.id.iv_thumbnail) void onThubmnailClicked() {
    Toast.makeText(getActivity(), posterTitle, Toast.LENGTH_SHORT).show();
  }
680703
private void adaptPreviewView() {
        if (previewView != null) {
            if (isPreviewShown()) {
                previewView.setVisibility(View.VISIBLE);
                previewView.setLayoutParams(createPreviewLayoutParams());
                previewLoader.load(getColor(), previewView);
            } else {
                previewView.setVisibility(View.INVISIBLE);
                previewView.setImageBitmap(null);
            }
        }
    }
25242
@Override
    public void addContentView(View view, LayoutParams params) {
        getSherlock().addContentView(view, params);
    }
1361929
public void setContentView(View view) {
        this.mContentView = view;
        ViewGroup.LayoutParams params = view.getLayoutParams();
        if (params == null) {
            params = new ViewGroup.LayoutParams(-1, -2);
        } else {
            params.width = -1;
            params.height = -2;
        }
        this.mContentView.setLayoutParams(params);
    }
130567
public void show() {
        if (isShowing) {
            Log.w("AlertWindow", "AlertWindow is already displayed.");
        } else {
            isShowing = true;
            mWindowManager.addView(mContentView, mParams);
        }
    }