Awesome Open Source
Awesome Open Source

Fragments: The Solution To (And Cause of) All Of Android's Problems

Samples and links from my blog post regarding the state of Fragments in 2017.

MVP Sample

Building

To build, install and run a debug version, run this from the root of the project:

  ./gradlew assembleDebug

Project

The sample code I have provided essentially doing the same thing in many different ways. This is a master -> detail example that displays a github user's repository and allows you to drill into the details.

All of the modules in this repository share code from the Common module. This module has various components such as:

  • ApplicationComponent - Base Dagger 2 application component which provides scoped instances of the GitHubApi and OkHttpClient.
  • BaseApplication - Creates and stores the base Dagger 2 application component.
  • Adapters - RecyclerView adapters that are shared amongst all the sample modules.

Each project implements a GITHUB_OWNER key in their build.gradle file. This is the value passed into the GitHub api's call. Here's an example.

References

Blog Posts

Libraries


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
java (31,284
android-architecture (103
fragments (40