app/src/main/java/com/adamg/materialtemplate/di/ViewModule.java
@Provides
    @ForActivity
    Activity provideActivityContext() {
        return mActivity;
    }
/**
     * Allow the activity context to be injected but require that it be annotated with
     * {@link ForActivity @ForActivity} to explicitly differentiate it from application context.
     */
Allow the activity context to be injected but require that it be annotated with
ForActivity  to explicitly differentiate it from application context.
Allow the activity context to be injected but require that it be annotated with ForActivity to explicitly differentiate it from application context .
@Provides
    @ForActivity
    Activity provideActivityContext() {
        return mActivity;
    }
@ Provides @ ForActivity Activity provideActivityContext ( ) { return mActivity ; }
Allow the activity context to be injected but require that it be annotated with
 {@link ForActivity @ForActivity} to explicitly differentiate it from application context.
Allow the activity context to be injected but require that it be annotated with { @link ForActivity @ForActivity } to explicitly differentiate it from application context .