Skip to content

Instantly share code, notes, and snippets.

@iamBedant
Created February 5, 2018 15:29
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 iamBedant/86370ca54525c73c5544e944cfff7462 to your computer and use it in GitHub Desktop.
Save iamBedant/86370ca54525c73c5544e944cfff7462 to your computer and use it in GitHub Desktop.
@Module
public class ActivityModule {
private Activity mActivity;
public ActivityModule(Activity activity) {
mActivity = activity;
}
@Provides
@ActivityContext
Context provideContext() {
return mActivity;
}
@Provides
Activity provideActivity() {
return mActivity;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment