简体   繁体   English

Android MVP 中的封装结构

[英]packaging structure in MVP for Android

I would like to know the best approach for packaging or folder structure for Android.I have gone through many tutorials for MVP pattern , some differentiate using common functionality(activities, model,presenter) and some use the application features (login, main, detail).Does the packaging structure differ with different design patterns?我想知道 Android 打包或文件夹结构的最佳方法。我已经阅读了许多 MVP 模式的教程,有些使用通用功能(活动、模型、演示者)进行区分,有些使用应用程序功能(登录、主要、详细信息) ). 不同设计模式的包装结构是否不同?

Which is the best pratice.Is there any supporting docs or tutorials to explain packaging structure in android?哪个是最佳实践。是否有任何支持文档或教程来解释 android 中的打包结构?

Thanks in advance.提前致谢。

Package structure of MVP would be (models, view, presenter) or it can be module wise. MVP 的包结构将是(模型、视图、演示者)或者它可以是模块明智的。


In my best knowledge, package structure would据我所知,包结构会

--app
    -package_name
      -models
      -views
      -presenters

See my code on githubgithub上查看我的代码

In this package structure,在这个包结构中,

  1. You can easily apply progaurd based on package structure.您可以根据包结构轻松应用 progaurd。
  2. It easily indicates project using MVP :)它很容易使用 MVP 指示项目:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM