@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_earthquake_summary); final Injection injection = new EarthquakeInjection(); injection.linkInstance(this, MasterViewController.class); injection.linkInstance( mMessageRepresentationHandler = new MessageRepresentationHandler(), IMessageRepresentationHandler.class); mMessageRepresentationHandler.setMasterViewController(this); mMessageRepresentationHandler.showLoading(); injection.link(); new Handler() .postDelayed( new Runnable() { @Override public void run() { MasterBusinessController mbc = injection.resolve(MasterBusinessController.class); mbc.startApp(); } }, 50l); }
@Override public void finish() { if (mMessageRepresentationHandler != null) { mMessageRepresentationHandler.hideLoading(); mMessageRepresentationHandler.hideMessage(); } if (mPresentedViewControllers != null) { mPresentedViewControllers.clear(); mPresentedViewControllers = null; } new Handler(Looper.getMainLooper()) .postDelayed( new Runnable() { @Override public void run() { EarthquakeMVC.super.finish(); } }, 150l); }