简体   繁体   English

MVP Android 实现

[英]MVP Android implementation

I did some research on MVP articles and examples, but I can not figure out how to apply MVP on my application code.我对 MVP 文章和示例做了一些研究,但我无法弄清楚如何将 MVP 应用于我的应用程序代码。 Are there specific guidelines for a proper MVP implementation for Android.是否有针对 Android 的正确 MVP 实现的具体指南。 and if there are examples a same application with MVC and MVP.如果有示例与 MVC 和 MVP 相同的应用程序。

and thank you :)谢谢你:)

Google architecture samples is a good way to start with MVP. Google 架构示例是从 MVP 开始的好方法。

  1. Clone this repository.克隆这个存储库。
  2. Read the code and try to understand.阅读代码并尝试理解。
  3. Try to replicate similar thing in your project.尝试在您的项目中复制类似的东西。
  4. Don't be afraid to shamelessly copy & move on even if you don't understand for a while.即使您有一段时间不理解,也不要害怕无耻地复制并继续前进。
  5. This is how I did it, with time you will understand what's going on & soon you can fit your requirements accordingly.我就是这样做的,随着时间的推移,你会明白发生了什么,很快你就可以相应地满足你的要求。

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

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