baku-toolkit/lib/src/main/java/io/v/baku/toolkit/VAndroidContextMixin.java
/**
     * Creates a `VAndroidContextMixin` with default settings. Default settings include:
     *
     * * {@link ErrorReporter}: {@link ErrorReporterFragment}
     * * {@link BlessingsProvider}: {@link BlessingsManagerBlessingsProvider}
     *
     * Furthermore, if the apk is built as {@linkplain DebugUtils#isApkDebug(Context) debug}, a
     * {@linkplain DebugFragment debug menu} is included.
     *
     * The signature of this method is intended to be called from {@link Activity#onCreate(Bundle)}
     * or similar methods.
     */
Creates a `VAndroidContextMixin` with default settings.

Furthermore, if the apk is built as  DebugUtils#isApkDebug(Context) debug, a
DebugFragment debug menu is included.

The signature of this method is intended to be called from  Activity#onCreate(Bundle)
or similar methods.
Creates a ` VAndroidContextMixin ` with default settings . Furthermore if the apk is built as DebugUtils#isApkDebug ( Context ) debug a DebugFragment debug menu is included . The signature of this method is intended to be called from Activity#onCreate ( Bundle ) or similar methods .
public static <T extends Activity> VAndroidContextMixin<T> withDefaults(
            final T activity, final Bundle savedInstanceState) {
        final FragmentManager mgr = activity.getFragmentManager();
        final ErrorReporterFragment errorReporter;
        if (savedInstanceState == null) {
            errorReporter = new ErrorReporterFragment();
            final FragmentTransaction t = mgr.beginTransaction()
                    .add(errorReporter, ErrorReporterFragment.TAG);
            if (DebugUtils.isApkDebug(activity)) {
                log.info("Debug menu enabled");
                t.add(new DebugFragment(), null);
            }
            t.commit();
        } else {
            errorReporter = ErrorReporterFragment.find(mgr);
        }
        return new VAndroidContextMixin<>(activity, BlessingsManagerBlessingsProvider::new,
                errorReporter);
    }
public static < T extends Activity > VAndroidContextMixin < T > withDefaults ( final T activity , final Bundle savedInstanceState ) { final FragmentManager mgr = activity . getFragmentManager ( ) ; final ErrorReporterFragment errorReporter ; if ( savedInstanceState == null ) { errorReporter = new ErrorReporterFragment ( ) ; final FragmentTransaction t = mgr . beginTransaction ( ) . add ( errorReporter , ErrorReporterFragment . TAG ) ; if ( DebugUtils . isApkDebug ( activity ) ) { log . info ( "Debug menu enabled" ) ; t . add ( new DebugFragment ( ) , null ) ; } t . commit ( ) ; } else { errorReporter = ErrorReporterFragment . find ( mgr ) ; } return new VAndroidContextMixin < > ( activity , BlessingsManagerBlessingsProvider :: new , errorReporter ) ; }
Creates a `VAndroidContextMixin` with default settings.
Creates a ` VAndroidContextMixin ` with default settings .