Created
July 26, 2017 14:44
-
-
Save vestrel00/f516a20b333071e88d6637ba9e180eb2 to your computer and use it in GitHub Desktop.
A: 3 - ui/common/BaseActivityModule.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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