Where should I move a library initialization when using Dagger 2?

Viewed 1286

I have this code that initializes Calligraphy default configuration.

public class MyApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();

        // The initialization I want to move
        CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
                        .setDefaultFontPath("fonts/MyFont.ttf")
                        .build()
        );
    }
}

I want to use Dagger 2 in my project but I don't fully understand what classes should I create and where to move this code in order to keep the project clean ?

1 Answers
Related