[FIXED] IllegalStateException: TabLayoutMediator attached before ViewPager2 has an adapter

Issue fragment_news_details <?xml version="1.0" encoding="utf-8"?> <layout> <data class="NewsDetailsBinding"> <variable name="adapter" type="com.abc.xyz.base.BaseAdapter" /> </data> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".news.NewsDetailsFragment">

Read more