SkillAgentSearch skills...

ActivityFragmentMVP

This is an example of interactions between Activity and it's Fragments using Android Model View Presenter

Install / Use

/learn @spengilley/ActivityFragmentMVP
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

ActivityFragmentMVP

A demonstration of handling Activities and Fragments using <a href="http://square.github.io/dagger/">Dagger</a> dependency injection framework

The real benefit here is that you create an object graph only when you need it. This contributes to keeping the memory footprint of your app as low as possible.

The scoped object graph is created in the OnCreate() method of any Activity that extends BaseActivity. You just need to override the getModules() method in your concrete Activity implementations to load the module for that activity.

Fragments, by way of the BaseFragment superclass method inject(), inject an instance of themselves into the Activities graph.

Featured on<br> Android Arsenal

View on GitHub
GitHub Stars319
CategoryDevelopment
Updated9d ago
Forks78

Languages

Java

Security Score

80/100

Audited on Mar 28, 2026

No findings