AndroidX TabLayout setupWithViewPager() not found

I am creating Tabs in my activity but using AndroidX. Not able to find setupWithViewPager() method.

How should I implement this method or is there any alternative method to setup viewpager?

here is my gradle

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation 'androidx.recyclerview:recyclerview:1.1.0'

There is no TabLayout in AndroidX. There is one in the older Android Support Library, and there is one in the Material Components for Android library.

You should not be able to find TabLayout either, with that set of dependencies.

Sorry for the late reply but how should I achieve same result using the androidx library? Thanks

There is no TabLayout in AndroidX, so I cannot answer your question.