goldze / MVVMHabit

👕基于谷歌最新AAC架构,MVVM设计模式的一套快速开发库,整合Okhttp+RxJava+Retrofit+Glide等主流模块,满足日常开发需求。使用该框架可以快速开发一个高质量、易维护的Android应用。
Apache License 2.0
7.6k stars 1.69k forks source link

ViewPager一直报错java.lang.IllegalArgumentException: ViewPager does not have a PagerAdapter set #108

Open gjmm123 opened 1 year ago

gjmm123 commented 1 year ago

binding.setAdapter(new ViewPagerBindingAdapter()); binding.xTab.setupWithViewPager(binding.viewPage); binding.viewPage.addOnPageChangeListener(new XTabLayout.TabLayoutOnPageChangeListener(binding.xTab)); initData中设置过了报错