Skip to content

Instantly share code, notes, and snippets.

@vestrel00
Created July 26, 2017 14:44
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 vestrel00/f516a20b333071e88d6637ba9e180eb2 to your computer and use it in GitHub Desktop.
Save vestrel00/f516a20b333071e88d6637ba9e180eb2 to your computer and use it in GitHub Desktop.
A: 3 - ui/common/BaseActivityModule.java
@Module
public abstract class BaseActivityModule {
static final String ACTIVITY_FRAGMENT_MANAGER = "BaseActivityModule.activityFragmentManager";
@Binds
@PerActivity
abstract Context activityContext(Activity activity);
@Provides
@Named(ACTIVITY_FRAGMENT_MANAGER)
@PerActivity
static FragmentManager activityFragmentManager(Activity activity) {
return activity.getFragmentManager();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment