OpenGitHub
Open source is not easy, if you like, please give a Star or Fork ^_^, thank you project address: github.com/fmtjava/Ope…
Project screenshots
Download experience
- Click download (Password :123456)
- Below the TWO-DIMENSIONAL code download (daily maximum 100 times, such as the maximum, or Clone source bar! ✧ (≖ ◡ ≖ ✿)))
Core Technology Stack
Kotlin language
I heard Android development is a good match for Kotlin! Kotlin language is 100% Compatible with Java, and has advanced features such as data classes, empty safety, lazy loading, property proxy, extension methods, function expressions, advanced functions, and so on, greatly simplifying the amount of code. You don’t need to worry about null Pointers, you don’t need to write complex Javabeans, and you can focus more on your business. Kotlin is a small and fresh language, as long as you have a solid Java, you can use Kotlin easily. Kotlin will make Android APP development a breeze for you. Learn kotlin!
AAC architecture
Still worried about an MVP memory leak? Are you still worrying about the selection of App architecture? Googel’s official AAC architecture is coming, making your App architecture clearer and not worrying about memory leaks. The architecture diagram is as followsModel-view-viewmodel, View refers to the green Activity/Fragment, mainly responsible for interface display, not responsible for any business logic and data processing. Model refers to the part of Repository that is responsible for fetching data and organizing local databases or remote servers. The ViewModel refers to the blue part of the figure, which is responsible for business logic and data processing. It does not hold the View layer reference itself and sends data to the View layer through LiveData. Repository consolidates data entry, whether it comes from a database or a server, and packages it to the ViewModel.
Core components
- Lifecycles: It holds information about the lifecycle state of a component (such as an Activity or Fragment) and allows other objects to observe this state
- ViewModel: Manage interface related data in a life-cycle manner, store data for activities and fragments until they are completely destroyed;
- LiveData: no manual control of the life cycle, no worry about memory leaks, data changes will be notified, combined with ViewModel can be said to be a match, but Lifecycles throughout it;
- DataBinding: Bind layout components to source data so that the layout components are updated as the source data changes. Use it with viewModels, LiveData, and Lifecycles to create the most MVVM sparks
- Room: Smooth access to SQLite database;
koin
Koin is a practical lightweight dependency injection framework for Kotlin. Written in pure Kotlin, it uses functional parsing only, no proxy, no code generation, and no reflection. Koin is a DSL, a lightweight and easy to use API. This is the end of the Dagger2 dilemma and makes dependency injection much easier.
Retrofit + Okhttp + Coroutines build powerful network requests
- Retrofit: A Web request library from Square that dramatically reduces the code and steps involved in HTTP requests
- Okhttp: Also Square, not much introduction, do Android should know
- Coroutines: Kotlin version 1.3 was released, and the stable version of Coroutines was also released. Coroutines is an amazing way to write asynchronous requests synchronously, improve readability, avoid callbacks, gracefully switch threads, The “dark magic” nature of Coroutines will impress you.
Coroutines (Coroutines)
Bothered by thread switching? Still Mired in the nightmare of a correction? Bothered by the performance penalty of Thread initialization? Kotlin1.3 coroutine stable version is coming, specifically to treat the above difficult problems, Android development using coroutine has the following advantages:
- Coroutines depend on threads, but they do not block threads when suspended, and are virtually costless. The coroutines are controlled by the developer.
- Asynchronous programming eliminates the need to write numerous callback interfaces, and Coroutines’ “dark arts” feature allows you to write code synchronously, increasing readability
- The coroutine scheduler handles thread switching more elegantly than Handler, AsyncTask, and Rxjava
LiveEventBus
LiveEventBus is an Android message bus, based on LiveData, with life cycle awareness, support Sticky, support AndroidX, support cross-process, support cross-app
Assent
The lightweight and flexible Android dynamic permission application framework supports Kotlin and AndroidX
Glide
Glide is much lighter than Fresco, the API is simpler to call, and it is recommended if image loading is not very demanding.
Update log
v1.7
- The use of coroutines further simplifies asynchronous code and makes it more readable
- Base classes such as BaseActivity and BaseMVActivity are encapsulated again
v1.6
- Encapsulates common list and unified paging template code
- Use FragmentTransaction#setMaxLifecycle(Fragment, Lifecycle.State) to replace setUserVisibleHint with a new Fragment lazy loading solution
- Base classes such as BaseFragment and BaseActivity are encapsulated again
- Adjust the project structure and optimize the code
v1.5
- Add dynamic permission application function, optimize the style and logic of welcome page and landing page
- Adjust the project structure and optimize the code
v1.4
- Improve the search function, new users and warehouse sorting search
- Adjust the project structure and optimize the code
v1.3
- Add koIN dependency injection framework to improve AAC architecture
- Adjust the project structure and optimize the code
v1.2
- Fixed Activity/Fragment custom exception handling not calling problem
- Adjust the project structure and optimize the code
v1.1
- Start the page to add an SVG animation
- Join DataBinding to improve the AAC architecture
- It is more convenient to LastAdapter replace BaseRecyclerViewAdapterHelper, combining DataBinding
- Adjust the project structure and optimize the code
v1.0
- Initialize the project and complete the core functions of Github App
Thanks
- kotlinx.coroutines
- koin
- Assent
- LastAdapter
- AgentWeb
- Glide
- Toasty
- LikeButton
- CircleImageView
- SmartRefreshLayout
- AnimatedSvgView
- MultiStateView
- XPopup
- LiveEventBus
- simple-view-behavior
- Okhttp
- Retrofit
About me
- WX: fmtjava
- QQ: 2694746499
- Email:[email protected]
- Github:github.com/fmtjava
License
Copyright (c) 2019 fmtjava
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.