/**
*
* 2014-8-28 下午4:39:34
* @param to
* @TODO 片段跳转,避免重复加载
*/
private void switchContent(Fragment to){
if(mCurrFragment!=to){
FragmentTransaction transaction=getSupportFragmentManager().beginTransaction();
if(!to.isAdded()){
transaction.hide(mCurrFragment).add(R.id.layout_frameContent, to).commit();
}else{
transaction.hide(mCurrFragment).show(to).commit();
}
}
mCurrFragment=to;
}
mCurrFragment为已显示的片段