Skip to content

Instantly share code, notes, and snippets.

@bffcorreia
Created May 28, 2017 14:38
Show Gist options
  • Save bffcorreia/9798d871f44cc92b487a26e7be093799 to your computer and use it in GitHub Desktop.
Save bffcorreia/9798d871f44cc92b487a26e7be093799 to your computer and use it in GitHub Desktop.
public class ClassA {
private final Context context;
@Inject public ClassA(Context context) {
this.context = context; // Application Context
}
}
public class ClassB {
private final Context context;
@Inject public ClassB(@Named("activity_context") Context context) {
this.context = context; // Activity Context
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment