Git Product home page Git Product logo

Comments (6)

YoKeyword avatar YoKeyword commented on May 28, 2024

hide还一个原因是为了在回退时可以触发onHiddenChanged()回调方法;
对于DialogFragment本意是Dialog的替代,而不是Fragment的替代,使用场景还是很大不同的 :)

from fragmentation.

xiewinson avatar xiewinson commented on May 28, 2024

好的,谢谢解答。反正我觉得这个比新版知乎好,知乎的很多地方都没hide,造成一些页面过度绘制很严重。我也一直想用单activity的方式,但是在网上很少见到相关的文章。

from fragmentation.

YoKeyword avatar YoKeyword commented on May 28, 2024

嗯啊,单AC坑比较多,需要不少耐心~

from fragmentation.

xiewinson avatar xiewinson commented on May 28, 2024

额-_-才发现from fragment在打开to fragment如果加入回退栈了,并且hide了from,这时候pop掉to fragment,from直接就显示出来了。。。好神奇的体验

from fragmentation.

YoKeyword avatar YoKeyword commented on May 28, 2024

哈哈,感兴趣可以看看源码~

from fragmentation.

xiewinson avatar xiewinson commented on May 28, 2024
case OP_HIDE: {
                    Fragment f = op.fragment;
                    f.mNextAnim = popEnterAnim;
                    mManager.showFragment(f,
                            FragmentManagerImpl.reverseTransit(transition), transitionStyle);
                } break;

看了源码,果然,在回退的时候,如果状态是hide,会调用showFragment,不错的用法。哈哈

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.