Giter Site home page Giter Site logo

Comments (8)

haonan avatar haonan commented on August 22, 2024

这个已经修复了。我明天提交代码,你看下。

from fileexplorer.

lishunli avatar lishunli commented on August 22, 2024

确实是有这样的问题,希望尽快 commit code

from fileexplorer.

haonan avatar haonan commented on August 22, 2024

已经提交代码了,请验证效果是否理想。tab切换,避免重新createView而出现的卡顿

from fileexplorer.

Noisyfox avatar Noisyfox commented on August 22, 2024

确实不卡了,不过为什么参数是2?

from fileexplorer.

Noisyfox avatar Noisyfox commented on August 22, 2024

难道说第三个page的编号是2?

from fileexplorer.

haonan avatar haonan commented on August 22, 2024

你看一下修改的summary。默认的值为1, 所以在tab切换的时候,会有recreate,会有数据加载,导致卡。现在设为2,就全部在内存里。
ViewPager.java类中的setOffscreenPageLimit函数的注释:
If you have a small number of pages (3-4)
that you can keep active all at once, less time will be spent in layout for
newly created view subtrees as the user pages back and forth.

from fileexplorer.

haonan avatar haonan commented on August 22, 2024

你看一下修改的summary。默认的值为1, 所以在tab切换的时候,会有recreate,会有数据加载,导致卡。现在设为2,就全部在内存里。
ViewPager.java类中的setOffscreenPageLimit函数的注释:
If you have a small number of pages (3-4)
that you can keep active all at once, less time will be spent in layout for
newly created view subtrees as the user pages back and forth.

from fileexplorer.

Noisyfox avatar Noisyfox commented on August 22, 2024

查了下ViewPage预加载的资料明白了

from fileexplorer.

Related Issues (20)

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.