Created
March 12, 2018 09:04
-
-
Save vvsevolodovich/5d1dd754feb85f2ac20abcf0c00b5911 to your computer and use it in GitHub Desktop.
SplashActivity with event listening
This file contains hidden or 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 SplashActivity extends Activity { | |
@Override | |
protected void onStart() { | |
super.onStart(); | |
eventBus.register(this); | |
} | |
@Override | |
protected void onStop() { | |
eventBus.unregister(this); | |
super.onStop(); | |
} | |
@Subscribe | |
public void on(DatabaseLoadedEvent event) { | |
progressBar.setVisibility(View.GONE); | |
showMainActivity(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment