java aspectj apt_采用Apt, AspectJ, Javassisit实现的Android AOP架构

2ec7b17072f58d7e9570597f98d66744.png

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:

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 37bbe3c6fec1e9f75dadaf315b677540.png

#更新日志:

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

#系列文章:

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

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

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

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

#答疑 运行报错的,自觉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

app.gif

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值