Skip to content

Instantly share code, notes, and snippets.

View PierreBou91's full-sized avatar
🌱

Pierre PierreBou91

🌱
  • Paris
View GitHub Profile
@PierreBou91
PierreBou91 / #MVI generic classes
Created October 30, 2020 11:28
MVI generic classes
Below are some MVI generic classes that can be used almost as is in any project.
They are useful to handle Data/Resource State during transfer between ViewModel, Repository and UI.
These classes are copied from Mitch Tabian GitHub:
https://github.com/mitchtabian
StateResource.kt
Wraps around response from Repository calls to allow 2 major behaviours:
1. UI update (Do we display a loading wheel ?/ The Data itself ?/ or nothing? depending on the state)
@PierreBou91
PierreBou91 / #Retrofit Generic classes
Last active October 29, 2020 17:32
Retrofit generic classes for Android
This code is originally from Architecture components google sample:
https://github.com/googlesamples/android-architecture-components/blob/master/GithubBrowserSample/app/src/main/java/com/android/example/github/api/ApiResponse.kt
And/or from Mitch Tabian GitHub:
https://github.com/mitchtabian
It helps in managing responses from retrofit calls and can be used as is in any project.
@PierreBou91
PierreBou91 / #Android Anims
Created October 29, 2020 10:22
Anims for Android apps
This Gist is a list of animations for Android apps. It can be reused.
These files where copied from Mitch Tabian GitHub: https://github.com/mitchtabian
More specifically from this project: https://github.com/mitchtabian/Open-API-Android-App/tree/Starting-Point/app/src/main/res/anim