private void setGridShown ( boolean shown , boolean animate ) { ensureList ( ) ; if ( mProgressContainer == null ) { throw new IllegalStateException ( "Can't be used with a custom content view" ) ; } if ( mGridShown == shown ) { return ; } mGridShown = shown ; if ( shown ) { if ( animate ) { mProgressContainer . startAnimation ( AnimationUtils . loadAnimation ( getActivity ( ) , android . R . anim . fade_out ) ) ; mGridContainer . startAnimation ( AnimationUtils . loadAnimation ( getActivity ( ) , android . R . anim . fade_in ) ) ; } else { mProgressContainer . clearAnimation ( ) ; mGridContainer . clearAnimation ( ) ; } mProgressContainer . setVisibility ( View . GONE ) ; mGridContainer . setVisibility ( View . VISIBLE ) ; } else { if ( animate ) { mProgressContainer . startAnimation ( AnimationUtils . loadAnimation ( getActivity ( ) , android . R . anim . fade_in ) ) ; mGridContainer . startAnimation ( AnimationUtils . loadAnimation ( getActivity ( ) , android . R . anim . fade_out ) ) ; } else { mProgressContainer . clearAnimation ( ) ; mGridContainer . clearAnimation ( ) ; } mProgressContainer . setVisibility ( View . VISIBLE ) ; mGridContainer . setVisibility ( View . GONE ) ; } }
Control whether the grid is being displayed . You can make it not displayed if you are waiting for the initial data to show in it . During this time an indeterminant progress indicator will be shown instead .