掘金 | 公众号 | 邮箱 |
---|---|---|
点我 | 程序员江同学 | [email protected] |
ricardojiang / android-architecture Goto Github PK
View Code? Open in Web Editor NEW追求android架构更佳实践~
License: MIT License
追求android架构更佳实践~
License: MIT License
掘金 | 公众号 | 邮箱 |
---|---|---|
点我 | 程序员江同学 | [email protected] |
observeState(this, T::a, T::b) { a, b-> }
这样写表示的应该是a和b数据的改变会触发同一个action吧?
如果这样写:
liveData {
observeState(this, T::a) { }
observeState(this, T::b) { }
}
跟直接observe没区别啊,代码还是不够简洁.
在Fragment導航至別頁回退回此頁後會重新,創建視圖。
onCreateView()
onViewCreated()
在這兩個生命週期中註冊。
會導致回退時重複註冊監聽。
進而重複觸發狀態更新,事件導航(導致閃退)
可否推薦一個作法
移至onCreate監聽、或在onDestroyView 註銷監聽、或有更合適的作法?
另外我是新手使用妳的Flow擴展類,若推薦註銷監聽可否提供基於封裝後的實踐方法?
感謝
如NetworkViewModel中局部请求后立即点home切后台, 等网络请求成功后再切回前台, ShowToast事件覆盖DismissLoadingDialog导致loading dialog未被dismiss
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.