Skip to content
This repository has been archived by the owner on Sep 12, 2019. It is now read-only.

bindView does not work perfectly with fragment withing viewpager #79

Open
MuBoori opened this issue Jan 21, 2018 · 1 comment
Open

bindView does not work perfectly with fragment withing viewpager #79

MuBoori opened this issue Jan 21, 2018 · 1 comment

Comments

@MuBoori
Copy link

MuBoori commented Jan 21, 2018

I've viewpager with 5 fragments one of the fragment has recyclerView
private val recyclerView : RecyclerView by bindView(R.id.list)

It works find once it first appears but one I move to other fragment and return to the fragment that has list, the list does not appear and I get
recyclerview No adapter attached; skipping layout
I switch to regular view.findViewById(). the issue has been resolve.

it looks bindView does not bind to fragment's view or something

@faizator
Copy link

I think you can try this forked version https://github.com/rubengees/kotterknife and call KotterKnife.reset(this) in onDestroyView() of fragments in viewpager.

override fun onDestroyView() {
    super.onDestroyView()
    KotterKnife.reset(this)
}

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

No branches or pull requests

2 participants