Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onLazyInitview onSupportView not call #40

Open
feng612266 opened this issue Apr 22, 2022 · 2 comments
Open

onLazyInitview onSupportView not call #40

feng612266 opened this issue Apr 22, 2022 · 2 comments

Comments

@feng612266
Copy link

I have no problem with the demo project. It just happened on my project.
The backstack has many stacks.

I don't understand why you use Looper.myQueue().addIdleHandler instead of getHandler().post
I have tried to keep your version 1.0.6, only using getHandler ().post
--> This issue is resolved

Originally posted by @HuuNguyen312 in #11 (comment)

@feng612266
Copy link
Author

i have the same problem,then modify the VisibleDelegate,enqueueDispatchVisible()、onpause(),use the origion taskDispatchSupportVisible and getHandler(),then it normal

@HuuNguyen312
Copy link

HuuNguyen312 commented Apr 28, 2022

I used this library for my project
https://github.com/weikaiyun/SFragmentation

override some functions to avoid affecting old fragments

BaseSimpleFragment 
....
override fun lazyInit() {
    super.lazyInit()
    isInited = true
    onRealVisible()
  }

  override fun onVisible() {
    super.onVisible()
    onSupportVisible()
  }

  override fun onInvisible() {
    super.onInvisible()
    onSupportInvisible()
  }

  open fun onSupportVisible() {
    
  }

  open fun onSupportInvisible() {
  }

  open fun initDataAndEvent() {

  }

  open fun onRealVisible() {

  }

  fun isSupportVisible(): Boolean {
    return supportDelegate.isVisible
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants