Skip to content

Instantly share code, notes, and snippets.

@joseprl89
Created May 27, 2018 19:11
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 joseprl89/3474e9c187b3ec465e861f680101fc4c to your computer and use it in GitHub Desktop.
Save joseprl89/3474e9c187b3ec465e861f680101fc4c to your computer and use it in GitHub Desktop.
How SupportActivity attaches a ReportFragment for Internals of Android Architecture Components Part II- LiveData
@RestrictTo(LIBRARY_GROUP)
public class SupportActivity extends Activity implements LifecycleOwner {
// ...
@Override
@SuppressWarnings("RestrictedApi")
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ReportFragment.injectIfNeededIn(this);
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment