T-MVP

项目地址:north2016/T-MVP
简介:Android AOP Architecture by Apt, AspectJ, Javassisit, based on Realm+Databinding+MVP+Retrofit+Rxjava2
更多:作者   提 Bug   
标签:

Apt、AspectJ、Javassisit

If you're confused about Android development, maybe it's time to open the door to a new world .

TMVP is a Aop Architecture with Apt、AspectJ、Javassisit, which based on Realm+Databinding+MVP+Retrofit+Rxjava2+MaterialDesign。

Build more complex functions with cleaner code,talk is cheap ,show u the code:

The following code to achieve the list of users to obtain the request, paging, display, just a sentence to achieve the entire complex module(ApiFactory is automatically generated by apt):

    mViewBinding.lvUser.getPresenter().setRepository(ApiFactory::getAllUser).fetch();

The user list itemType is its layoutId, set by attr in xml:

  <com.base.adapter.TRecyclerView
            android:id="@+id/lv_user"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:isRefreshable="false"
            app:itemType="@layout/list_item_user"
            app:layout_behavior="@string/appbar_scrolling_view_behavior" />

no Adapter,no ViewHolder,no onRefreshListener,on onLoadMoreListener

maybe u will like it.

===============Gorgeous dividing line===================

===============华丽丽的分界线===================

为兼容 linux、ubuntu 等系统,已发布插件到本地 repo 文件夹下,如果你对插件内容有所修改,则需要重新发布,运行前需要在 Terminal 中运行 ./gradlew -p buildsrc clean build uploadArchives --info

QQ 群:AndroidMVP 555343041 AndroidMVP

更新日志:

2017/1/31:AOP 新增 SysPermissionAspect 支持动态申请系统权限切片,轻松适配 6.0+

2017/1/27:AOP 新增 DbRealmAspect 支持 Realm 数据库,数据库突破你想像的简单(年夜特供)

2017/1/9: AOP 新增 CheckLoginAspect 切片拦截未登陆用户,控制未登陆用户的操作权限

2017/1/8: 使用 Apt 封装 Retrofit 生成 ApiFactory 替换掉所有的 Repository,狂删代码

2017/1/7: 使用 DataBinding 替换掉所有的 ButterKnife,狂删代码

2017/1/6: 使用 DataBinding 替换掉所有的 ViewHolder,狂删代码,从此迈向新时代

2016/12/30:使用 Apt 生成全局路由 TRouter,更优雅的页面跳转,支持传递参数和共享 view 转场动画

2016/12/29:去掉 BaseMultiVH 新增 VHSelector 支持更完美的多 ViewHolder

2016/12/28:使用 Apt 生成全局的 ApiFactory 替代所有的 Model

2016/12/27:增加了 BaseMultiVH 扩展支持多类型的 ViewHolder

2016/12/26:抽离 CoreAdapterPresenter 优化 TRecyclerView

系列文章:

安卓 AOP 实战:面向切片编程

Android 实用技巧之:用好泛型,少写代码

安卓 AOP 实战:APT 打造极简路由

全局路由 TRouter,更优雅的页面跳转

安卓 AOP 实战:Javassist 强撸 EventBus

加入 OkBus,实现注解传递事件

安卓 AOP 三剑客:APT,AspectJ,Javassist

1、去掉所有反射>2、新增 apt 初始化工厂,替换掉了 dagger2。>3、新增 aop 切片,处理缓存和日志

关键词 AOP+MVP+Retrofit+Rxjava+MaterialDesign+LeanCloud+NodeJS

简书:http://www.jianshu.com/p/b49958e1889d

weibo:http://weibo.com/1917320262

Github:https://github.com/north2016/T-MVP

答疑

运行报错的,自觉 google,检查 As 版本(2.2.2),gradle 配置等(AndroidStudio 每个版本 gradle 的 api 都不一样,坑),低版本手机 FloatingActionButton 在 xml 会报错,因为 icon 用了 SVG(5.0+)

参考配置: as:2.2.2 grade:2.2.3 buildTools:24.0.3

本 demo 现阶段处于快速优化迭代状态,只提供 idea,暂不提供 lib

首页

License

Copyright 2016 north

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://www.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.
Android 开发经验分享
C 轮融资近 30 亿元理财推荐
Android 开发经验分享
C 轮融资近 30 亿元理财推荐