Code example for Fragment

Methods: onViewCreated

0
    /** 
     * Attach to view once the view hierarchy has been created. 
     */ 
    @Override 
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        ensureContent(); 
    } 
 
    /** 
     * Detach from view. 
     */ 
    @Override 
    public void onDestroyView() { 
        mContentShown = false;
        mIsContentEmpty = false;
        mProgressContainer = mContentContainer = mContentView = mEmptyView = null;
        super.onDestroyView(); 
    } 
 
    /**