小程序页面之间进行传值的操作办法
1052
2022-10-10
Android MVP架构:示例应用程序
Android MVP Architecture: Sample App
This repository contains a detailed sample app that implements MVP architecture using Dagger2, GreenDao, RxJava, FastAndroidNetworking, PlaceHolderView and AndroidDebugDatabase
Architecture Blueprint
Project Structure
Read the below listed articles. They describe the MVP concepts and the Project structure.
MVP: Part 1MVP: Part 2MVP: Part 3Extension with Interactors and Repositories
The app has following packages:
data: It contains all the data accessing and manipulating components.di: Dependency providing classes using Dagger2.ui: View classes along with their corresponding Presenters.service: Services for the application.utils: Utility classes.
Classes have been designed in such a way that it could be inherited and maximize the code reuse.
Library reference resources:
RxJava2: https://github.com/amitshekhariitbhu/RxJava2-Android-SamplesDagger2: https://github.com/MindorksOpenSource/android-dagger2-exampleFastAndroidNetworking: https://github.com/amitshekhariitbhu/Fast-Android-NetworkingPlaceHolderView: https://github.com/janishar/PlaceHolderViewAndroidDebugDatabase: https://github.com/amitshekhariitbhu/Android-Debug-DatabaseCalligraphy: https://github.com/chrisjenx/CalligraphyGreenDao: http://greenrobot.org/greendao/ButterKnife: http://jakewharton.github.io/butterknife/
Concept reference resources:
Introduction to Dagger 2: Part 1Introduction to Dagger 2: Part 2Android Dagger2: Critical things to know before you implementThe Best Android Networking Library for Fast and Easy NetworkingRxJava + Fast Android NetworkingMigrating from RxJava 1.0 to RxJava 2.0 and Learn RxJava by ExamplesAndroid Tinder Swipe View ExampleDebugging Android Databases And Shared Preferences In The Easiest WayRxJava Anatomy: What is RxJava, how RxJava is designed, and how RxJava works.Powerful Android ORM: greenDAO 3 Tutorial
Learn to build a ride-sharing Android app like Uber, Lyft - Check here
Looking for MVVM Architecture for Beginners - Check here
Looking for MVVM Architecture - Check here
Looking for Kotlin MVP Architecture - Check here
Mindorks open source projects
Check out Mindorks awesome open source projects here
How do I use this project?
This is a boilerplate project aimed to help bootstrap new Android MVP Applications. Feel free to fork this application or use AndroidStarters to create new app using this boilerplate.
MVP template
When we follow any architecture pattern like MVP, MVVM, MVP clean, we always come across a small but repetitive task to create basic files like Android Activity, Presenter, View, Api models and then writing boiler plate code. This usually takes 1-2 hours for each single screen. To ease out work and save time We have created an automated template which will do above work in less than 20 seconds.
How to Install
Find the template/MVPActivity folder under root directory of android-mvp-architecture app. Paste the MVPActivity folder at below location.
Windows - C:\Program Files\Android\Android Studio\plugins\android\lib\templates\activitiesMac - /Applications/Android/Studio.app/Contents/plugins/android/lib/templates/activities
Restart the Android Studio.
How to use
Select the folder under which you want to create a new MVP folder. This MVP folder will contain Activity, Presenter, MVpPresenter and View class. For example, to create a new MVP folder under “view” folder, do as shown below.
License
Copyright (C) 2017 MINDORKS NEXTGEN PRIVATE LIMITED Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Contributing to Android MVP Architecture
All pull requests are welcome, make sure to follow the contribution guidelines when you submit pull request.
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~