Skip to content

Instantly share code, notes, and snippets.

@Richie97
Created May 17, 2017 16:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Richie97/c0f681c152a4d01c076b4ad5573d9a5d to your computer and use it in GitHub Desktop.
Save Richie97/c0f681c152a4d01c076b4ad5573d9a5d to your computer and use it in GitHub Desktop.
Lifecycle Aware AppCompatActivity
public class LifecycleAppCompatActivity extends AppCompatActivity implements LifecycleRegistryOwner {
private final LifecycleRegistry mRegistry = new LifecycleRegistry(this);
public LifecycleAppCompatActivity() {
}
public LifecycleRegistry getLifecycle() {
return this.mRegistry;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment