MVVM Starter


Source link: https://github.com/flipboxstudio/mvvm-starter

mvvm-starter

A starter project for Android MVVM Project with DataBinding Library and RxJava 2

How To Use

You can create new project using our project generator here MVVM Starter Generator - by using our generator you can save the hassle of renaming every package reference & changing folder structure manually. Just input your App & Package name and extract the downloaded file for your future development

--

Libraries used :

  • Retrofit com.squareup.retrofit2:retrofit:2.3.0
  • Glide com.github.bumptech.glide:glide:4.0.0-RC1
  • EasyPermission pub.devrel:easypermissions:0.4.3
  • Hawk com.orhanobut:hawk:2.0.1
  • Android Libraries ( appcompat, design support, data binding, etc )
  • Sosoito Loading Layout com.github.flipboxstudio:sosoito:v1.0.3
  • Data Binding Validator com.github.Ilhasoft:data-binding-validator:0.6.4
  • Rx Java 2 + Rx Android io.reactivex.rxjava2:rxandroid:2.0.1 & io.reactivex.rxjava2:rxjava:2.1.2

--

Setup included :

  • Data Binding
    • Using Android Data Binding Library
    • ViewModel is inside viewmodels package
  • Splash Screen
  • Authentication Flow
    • Using Retrofit & ResponseInterceptor for request & response handling
    • Dummy API using https://jsonplaceholder.typicode.com
    • AuthActivity as Fragments Container
    • LoginFragment as Login UI with data binding validation
    • ForgotPasswordFragment as Forgot Password UI
    • RetrofitErrorAdapter to handle retrofit throwable error
  • RecyclerView Sample
    • Sample recyclerview implementation using viewholder & databinding
    • Using User as dummy object representation
    • See RecyclerViewActivity for details
  • ViewPager Sample
    • Sample viewpager implementation using tablayout
    • See ViewPagerActivity for details
  • Android M permission handler using EasyPermissions
    • Handle permission for Android M and above
    • Sample implementation for CAMERA access permission
  • Reusable Style
    • All colors are available inside colors.xml
    • Styles are available inside styles.xml
    • Custom Fonts are using CustomTextView on utils package and custom attribute on attrs.xml
    • Vector Drawable assets
    • Roboto fonts included
  • Rx Java 2 Samples
    • Get data from API using Maybe
    • Find existing data from cache & get from API if not exists
    • Based on RxJava pattern described here
  • Utilities classes
    • Camera Utils : Get image from camera / gallery
    • Calendar Utils : Parse & display Calendar object into various format

--

ToDo

  • Documentation & Wiki
  • Analytics setup
  • RxJava 2 RetryWhen sample
  • Retrofit Error Handler & sample
  • JWT Library & Utils
  • Data validation
  • Basic Location detection
  • Simple Custom toolbar & menu
  • Android M permissions sample
  • Calendar utils
  • Camera utils
  • RecyclerView sample
  • ViewPager sample
  • Any suggestion?

Resources

Simple Meter for Android.

An easy way to let your titlebar or bottom navigation hiding on scroll for Android.

Limit Indicator (as the name describes) indicates the limit of something being used. For example out of 20 gallons gas, one used 10 gallons of it. Or Your total value was 100 and you have used 80. To show the progress of such usage, I have created the limit indicator which is round and it shows an animation of certain usage. It can also be seen as a Circular Progress Bar.

This repo enables you to show videos instead of usual profile picture for chat heads. Inspired from Facebook's Video profile picture, I decided to replicate its implementation to show videos in profile picture and to create chat heads for the same.

A multi-functional FAB component with customizable options.

BlurKit is an extraordinarily easy to use utility to get live blurring just like on iOS.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes