Giter VIP home page Giter VIP logo

Comments (7)

linglongxin24 avatar linglongxin24 commented on July 17, 2024

这个是由于viewpager的预加载机制所造成的,正因为每次都destroy了,所在下次才需要再lazyLoad里面加载数据

from viewpagerfragmentlazyload.

Jeff-1203 avatar Jeff-1203 commented on July 17, 2024

在fragment来回切换的时候,还是依然在不停的destory,和lazyLoad呀

有没有好的方案来处理这种情况 数据每次都会重新请求

from viewpagerfragmentlazyload.

linglongxin24 avatar linglongxin24 commented on July 17, 2024

在lazyload方法里面只有回调一次啊

from viewpagerfragmentlazyload.

Jeff-1203 avatar Jeff-1203 commented on July 17, 2024

在lazyload方法里面只有回调一次啊

如果多个fragment 滑动的话 那每次界面 接口来回滑动的话 都要重新去画界面 请求接口 这样很耗费资源

from viewpagerfragmentlazyload.

linglongxin24 avatar linglongxin24 commented on July 17, 2024

不管你如何滑动,在lazyload方法里面只会回调一次啊

from viewpagerfragmentlazyload.

Jeff-1203 avatar Jeff-1203 commented on July 17, 2024

不管你如何滑动,在lazyload方法里面只会回调一次啊

当fragment来回切换时,它会重复请求网络数据 这个怎么去优化的呢

from viewpagerfragmentlazyload.

MIkeeJY avatar MIkeeJY commented on July 17, 2024

@yinking1203 你不让fragment滑动每次销毁了就是了

from viewpagerfragmentlazyload.

Related Issues (4)

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.