1.通过databinding实现MVVM
https://www.jianshu.com/p/bd9016418af2
2.databinding更新imageview图片
https://blog.csdn.net/zhangphil/article/details/79346064
3.databinding双向绑定
https://www.jianshu.com/p/564bb7f21fcc
4.github MVVM框架(不兼容)
https://github.com/goldze/MVVMHabit
5.mvvm 参考demo
https://github.com/erikjhordan-rey/People-MVVM
https://github.com/husaynhakeem/TicTacToe-MVVM
第一步:databinding双向绑定
1. Layout页面alt+enter
2. 设置变量名字,引用其他类

建立可以观察的model

[if !supportLists]1. [endif]新建view1model绑定view和model并写入所需要的业务逻辑和事件

[if !supportLists]1. [endif]绑定view控件

网友评论