long1eu / long1eu/SpaceTabLayout
spaceTabLayout initialize issue in kotlin and how use spaceTabLayout in kotlin
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 265
- PR merge metrics
- No merged PRs in 30d
Description
val fragmentList = ArrayList()
fragmentList.add(HomeFragment.newInstance())
fragmentList.add(HomeFragment.newInstance())
fragmentList.add(HomeFragment.newInstance())
fragmentList.add(HomeFragment.newInstance())
fragmentList.add(HomeFragment.newInstance())
val adapter = HomeTabAdapter(this, supportFragmentManager, 5)
binding.viewPager!!.adapter = adapter
binding.spaceTabLayout.initialize(binding.viewPager,getSupportFragmentManager(),fragmentList,savedInstanceState)
java.lang.IllegalArgumentException: No view found for id 0x7f080102 (com.nuatransmedia.sliver_spoon:id/viewPager) for fragment HomeFragment{51a71a9 #1 id=0x7f080102 android:switcher:2131230978:1}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the binding.viewPager setup and the binding.spaceTabLayout.initialize(...) call, then inspect how HomeTabAdapter and HomeFragment are configured. Reproduce the reported No view found error and confirm the initialization works without that exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100