| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
一款适用于 Intellij IDEA 和 Android Studio 的插件, 可用于为MVP架构生成接口以及实现类, 解放双手.
欢迎 Issue Report, 欢迎 Feature Request, 欢迎 Pull Request
感谢XieEDeHeiShou 提供重构后的代码以及特性跟进。
Contract 模式:
Presenter 模式(已设置后缀Impl):
后缀支持:
日志输出(气球偶尔会闪现一下,可以在Event Log里关闭):
错误提示:
对于MVP模式,定义一个 Contract 类来放置 Model , View , Presenter 的接口,将大大减少类文件。 将普通的接口替代如下:
public interface GoodsInfoContract {
interface View {
}
interface Presenter {
}
interface Model {
}
}
下载MvpHelper_v2_3_release.jar 或者前往 releases
安装插件
在 Contract 类或者 Presenter 类内部,点击 Generate 菜单或使用快捷键 Alt + Insert, 选择 Mvp Helper 即可生成对应文件.
com.example.project.package1.contract.package2.AContract 将会生成 com.example.project.package1.model.package2.AModel 以及 com.example.project.package1.presenter.package2.APresenter
Copyright 2016 androidwing1992
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.
| Back | FazBrowse Home | New Git URL |