Skip to content

Instantly share code, notes, and snippets.

@nisrulz
Created September 17, 2017 22:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nisrulz/4f40bc62018171fbee8f19db7d40d2e1 to your computer and use it in GitHub Desktop.
Save nisrulz/4f40bc62018171fbee8f19db7d40d2e1 to your computer and use it in GitHub Desktop.
Making your Android Library, Lifecycle-Aware blog post code snippet: MainActivity class
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Init
AwesomeLibMain.getInstance().init();
}
@Override
protected void onDestroy() {
super.onDestroy();
// Cleanup
AwesomeLibMain.getInstance().cleanup();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment