@@ -0,0 +1,976 @@
+package com.malalaoshi.android.util;%0A%0Aimport android.app.Fragment;%0Aimport android.app.FragmentManager;%0Aimport android.app.FragmentTransaction;%0A%0Aimport com.malalaoshi.android.R;%0A%0A/**%0A * Created by zl on 15/11/30.%0A */%0Apublic final class FragmentUtil%7B%0A    public static void openFragment(int containerViewId,FragmentManager fragmentManager, Fragment pre, Fragment newFragment, String fragmentTag)%7B%0A        FragmentTransaction tx = fragmentManager.beginTransaction();%0A        if(pre != null)%7B%0A            tx.hide(pre)%0A            .add(containerViewId, newFragment, fragmentTag)%0A            .addToBackStack(null);%0A        %7Delse%7B%0A            tx.replace(containerViewId, newFragment, fragmentTag);%0A        %7D%0A        tx.commit();%0A    %7D%0A    public static void opFragmentMainActivity(FragmentManager fragmentManager, Fragment pre, Fragment newFragment, String fragmentTag)%7B%0A        FragmentUtil.openFragment(R.id.content_layout, fragmentManager, pre, newFragment, fragmentTag);%0A    %7D%0A%7D%0A

add fragmentUtil