Git Product home page Git Product logo

Comments (3)

YoKeyword avatar YoKeyword commented on May 29, 2024

@damingwangguan
感谢反馈~ BUG谈不上 - -! 是Fragment的动画机制问题~

1、是调用哪个ViewTreeObserver呢? 里面进行了什么操作,复杂吗? 因为Fragment的入栈动画和Fragment的创建是同时的,生命周期: onCreate -> onCreateView -> onCreateAnimation,你看下你的场景是否可以把ViewTree的耗时、计算部分放到onEnterAnimEnd()方法里执行,这个方法是在入栈动画完成时调用,可以有效避免动画卡顿

2、onHidenChanged触发的时机是在 出栈动画开始时,如果此时在里面做耗时操作可能会导致出栈动画卡顿,这个可以通过延迟一个动画时间再执行 耗时操作,这个地方是否需要库封装出一个延迟的新onHiddenChanged方法,我再考虑下哈~

from fragmentation.

damingwangguan avatar damingwangguan commented on May 29, 2024

感谢,正是你说的这种情况,我的解决方法也是延迟操作,ViewTreeObserver的问题,是因为我需要获取weiget的高度,而在fragment里没有合适的时机进行获取,只好加了一个监听,我当时加的是ongloalxxxx的监听器,结果是动画不出来还是滑动返回不响应(好像是其中某一个)。

from fragmentation.

YoKeyword avatar YoKeyword commented on May 29, 2024

@damingwangguan 好的 第一种情况我回头留意下看看什么情况~ 感谢反馈

from fragmentation.

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.