Code Monkey home page Code Monkey logo

Comments (9)

angcyo avatar angcyo commented on July 30, 2024 1

已更新了demo代码,实现了你的要求

com.angcyo.dsltablayout.demo.sample.SampleActivity

from dsltablayout.

scsfwgy avatar scsfwgy commented on July 30, 2024

另外一种需求,比如跳转到 我的 tab,跳转前我希望可以进行拦截,比如登录后允许,未登录不允许。现在是只能监听选中了某个tab,无法拦截。

from dsltablayout.

scsfwgy avatar scsfwgy commented on July 30, 2024

我这边用的判定fragment可见不可见的逻辑是基于老的setUserVisibleHint方法的,上面给的例子第二次在进入各种生命周期都不会走。不知道是不是setMaxLifecycle的问题。参考:

fun show(f: Fragment, hide: Fragment? = null) {

from dsltablayout.

scsfwgy avatar scsfwgy commented on July 30, 2024

image
最后一个条件判定为false,导致最近可见性错误。

from dsltablayout.

angcyo avatar angcyo commented on July 30, 2024

尽量使用最新的技术setMaxLifecycle

from dsltablayout.

scsfwgy avatar scsfwgy commented on July 30, 2024

老项目,牵一发动全身😂...

from dsltablayout.

angcyo avatar angcyo commented on July 30, 2024

那问题出在懒加载方案上了?

from dsltablayout.

scsfwgy avatar scsfwgy commented on July 30, 2024

就是判定可见时做一些操作,上述那个可见条件最后一个值不对。我现在重写了那个方法,把最后一个参数干掉了。但是很奇怪,不知道具体原因。之前没用setMaxLifecycle是好好的。

from dsltablayout.

angcyo avatar angcyo commented on July 30, 2024

Good Lucy

from dsltablayout.

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.