Code example for LayoutTransition

Methods: setDuration, setInterpolator, setStagger

0
    protected void onResume() { 
	super.onResume(); 
 
	LayoutTransition trans = mContainer.getLayoutTransition();
 
	trans.setInterpolator(LayoutTransition.APPEARING,
		new AccelerateInterpolator(1.2f));
	trans.setInterpolator(LayoutTransition.CHANGE_APPEARING,
		new AccelerateInterpolator(1.2f));
	trans.setInterpolator(LayoutTransition.CHANGE_DISAPPEARING,
		new AccelerateInterpolator(1.2f));
	trans.setInterpolator(LayoutTransition.CHANGING,
		new AccelerateInterpolator(1.2f));
	trans.setInterpolator(LayoutTransition.DISAPPEARING,
		new AccelerateInterpolator(1.2f));
 
	trans.setDuration(LayoutTransition.APPEARING, DURATION);
	trans.setDuration(LayoutTransition.CHANGE_APPEARING, DURATION);
	trans.setDuration(LayoutTransition.CHANGE_DISAPPEARING, DURATION);
	trans.setDuration(LayoutTransition.CHANGING, DURATION);
	trans.setDuration(LayoutTransition.DISAPPEARING, DURATION);
	// 
	trans.setDuration(DURATION);
	trans.setStagger(LayoutTransition.APPEARING, 0);
	trans.setStagger(LayoutTransition.CHANGE_APPEARING, 0);
	trans.setStagger(LayoutTransition.CHANGE_DISAPPEARING, 0);
	trans.setStagger(LayoutTransition.CHANGING, 0);
	trans.setStagger(LayoutTransition.DISAPPEARING, 0);
 
    } 
 
    private class GridAdapter extends BaseAdapter {