一个MVP架构利器。自动生成接口文件,且不需要实现接口。
一个MVP架构利器。自动生成接口文件,且不需要实现接口。
dependencies {
implementation 'com.linuxpara:edgemvp:1.0.4'
annotationProcessor 'com.linuxpara:edgemvp-complier:1.0.4'
}
@MvpView使用
@MvpPresenter使用
点击按钮,自动生成代码。(PS:同步按钮不会生成代码)
view层中创建presenter对象。
private ILoginPresenter mPresenter;
.....
mPresenter = EdgeMvp.createPresenter(this);
mPresenter.login("test", "12345");
presenter层中获取view对象。
((ILoginView) EdgeMvp.getViewProxy(LoginPresenter.this));
该项目还存在不足的地方,各位大神有什么好的想法或者建议,望不吝赐教。
最后,都看这里了,给点个星呗。(^∀^)
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.