package com.vinexs.eeb.misc;

import android.os.Bundle;

@SuppressWarnings("unused")
public class BundleArgs {

    public static final String animationEnter = "animationEnter";

    public static final String animationExit = "animationExit";

    public static final String breadCrumbTitle = "breadCrumbTitle";

    public static final String breadCrumbShortTitle = "breadCrumbShortTitle";

    public static final String fragmentName = "fragmentName";

    public static final String fragmentId = "fragmentId";

    public static final String addToBackStack = "addToBackStack";

    public static Bundle getDefault() {
        Bundle bundle = new Bundle();
        bundle.putBoolean(BundleArgs.addToBackStack, false);
        return bundle;
    }

    public static Bundle setTitle(Bundle bundle, String title) {
        bundle.putString(BundleArgs.breadCrumbTitle, title);
        return bundle;
    }

    public static Bundle setShortTitle(Bundle bundle, String shortTitle) {
        bundle.putString(BundleArgs.breadCrumbShortTitle, shortTitle);
        return bundle;
    }

    public static Bundle setName(Bundle bundle, String name) {
        bundle.putString(BundleArgs.fragmentName, name);
        return bundle;
    }

    public static Bundle setName(Bundle bundle, int id) {
        bundle.putInt(BundleArgs.fragmentId, id);
        return bundle;
    }

    public static Bundle setAnimation(Bundle bundle, int enterAnim, int exitAnim) {
        bundle.putInt(BundleArgs.animationEnter, enterAnim);
        bundle.putInt(BundleArgs.animationExit, exitAnim);
        return bundle;
    }

    public static Bundle hasBackStack(Bundle bundle) {
        bundle.putBoolean(BundleArgs.addToBackStack, true);
        return bundle;
    }


}

@@ -42,17 +42,111 @@
 oid.
-os.Bundle
+app.Activity;%0Aimport android.content.Context;%0Aimport android.os.Bundle;%0A%0Aimport com.vinexs.tool.Utility
 ;%0A%0A@
@@ -704,16 +704,31 @@
 Default(
+Context context
 ) %7B%0A    
@@ -760,16 +760,74 @@
 undle();
+%0A%0A        // Set the fragment cannot remove by back stack.
 %0A       
@@ -876,24 +876,340 @@
 ck, false);%0A
+%0A        // Set application name as default name.%0A        String appName = Utility.getAppName(context);%0A        if (context instanceof Activity) %7B%0A            Activity activity = (Activity) context;%0A            appName = Utility.getAppName(activity);%0A        %7D%0A        bundle.putString(%22breadCrumbTitle%22, appName);%0A%0A
         retu

Change method getDefault(), add application name as default.