Git Product home page Git Product logo

rxjavaretrofitdemo's Issues

回调可以用抽象方法代替

GithubService.getInstance()
.createGithubService()
.contributors("square","retrofit")
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new ProgressSubscriber<List>(RetrofitActivity.this) {
@OverRide
protected void nextReponse(String result) {
Log.i("xxxxxxxxxx:",result);
}
});

网络请求很快的话,进度条闪一下

如果网络请求很快的情况下,进度条就会闪一下出现请求的结果,怎么优化这个进度条闪一下的问题?比如说如果很快的话就把进度条隐藏,如果请求不是那么快的话就显示进度条。

如果嵌套请求?

例如:我需要请求2个接口,第二个接口需要第一个接口得到的返回值作为参数,这样如何实现?

内存泄漏

有内存泄漏问题,仅仅测试一个Activity,内存泄漏就会出现,关键在于ew ProgressSubscriber(getTopMovieOnNext, MainActivity.this)传递了MainActivity.this,并传给handler,我觉得这样做不太合适,在Android里handler内存泄漏是一个比较突出的地方,最好是dialog传递消息部分不用handler较为合适。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.