xybcoder / gank Goto Github PK
View Code? Open in Web Editor NEWgank.io unofficial client - RxJava2、Retrofit2 & MVP技术干货
License: GNU General Public License v3.0
gank.io unofficial client - RxJava2、Retrofit2 & MVP技术干货
License: GNU General Public License v3.0
正在学MVP,发现gank项目中的网络请求写在了presenter层,但是看其他技术博客对model层的介绍是:Model层负责获取或存储在远程或本地的数据。那么按道理的话 网络请求应该是在model层请求的 有点疑惑。
gank项目中的GankPresenter的fetchGankData方法是retrofit请求网络的。
private static volatile OkHttpClient sOkHttpClient;
这一句中的 volatile 啥作用呢
BasePresenter 里面 protected T iView; 直接持有一个 ivew.
那么它的 release 方法应该在 baseactivity的 ondestroy 执行, 解绑 presenter 和 ivew?
如果不执行, 应该是 presenter 一直持有 activity 的实例了, 有内存泄漏的风险?
谢谢
我正在看你的项目,有些不懂的。能否有偿向你提问下呢?有偿,谢谢!
在进入一个页面的时候发出的请求,但是由于网络很慢请求没返回,这是关闭了这页面, 在该项目里面presenter解绑以后iView置空了,抛出了空指针异常, 对于这种情况,如果不采用那种在使用iView的时候进行空判断 怎么解决比较好。
GankAdapter对应的 是否是 妹子图片下的文字内容的adapter呢
hosttype是什么逻辑呢
同样在学习,请问一下Rx编程,没有提现吧!在retrofit中都没有用,在别的哪里用了么?求解
我吧onScroll给删了,还是有下滑隐藏FloatingActionBar ,上滑显示。而且在onScroll里面Log的话,不显示。
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.