Code example for View

Methods: getDrawingCachesetDrawingCacheEnabled

0
	 * Save state of child before you change it and call {@link #changeState(boolean)} after changes 
	 * are made. 
	 */ 
	public void saveState() { 
		if (mMainView != null) {
			mMainView.setDrawingCacheEnabled(true);
			Bitmap b = mMainView.getDrawingCache();
			 
			if (b != null) {
				mCachedState.setImageBitmap(Bitmap.createBitmap(b));
			} 
			 
			mMainView.setDrawingCacheEnabled(false);
		} 
	} 
	 
	/** 
	 * Animate child state change (saved before with {@link #saveState()}). 
	 *  
	 * @param forward 
	 *            {@code true} will use {@link AnimType#IN} and {@link AnimType#OUT}, {@code false}