Last active
October 28, 2017 17:21
-
-
Save yayaa/e64497c9c3a20e16ab8b21cf2f69cb63 to your computer and use it in GitHub Desktop.
https://tech.xing.com/how-big-is-your-application-4c89377c51d - Simple App OnCreate - 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SimpleApplication extends Application { | |
@Inject CoolAnalyticsTool coolAnalyticsTool; | |
@Inject ImageLoaderConfiguration imageLoaderConfiguration; | |
@Inject ImageLoader imageLoader; | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
ApplicationComponent.create(this).inject(this); | |
imageLoader.init(imageLoaderConfiguration); | |
coolAnalyticsTool.configure(this); | |
importantMethod(); | |
PerformanceTool.monitor(this); | |
SomeUtilObject.init(this); | |
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder() | |
.setDefaultFontPath("fonts/some_font_path.ttf") | |
.setFontAttrId(android.R.attr.fontFamily) | |
.build()); | |
if (LeakCanary.isInAnalyzerProcess(this)) { | |
// This process is dedicated to LeakCanary for heap analysis. | |
// You should not init your app in this process. | |
return; | |
} | |
LeakCanary.install(this); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment