Skip to content

Commit 2bb0fa1

Browse files
Material Design Teamldjcmu
authored andcommitted
Adding ViewPager2 as dependency to MDC
This paves the way to add TabLayoutMediator to MDC's tabs library, which makes it possible for a ViewPager2 to be linked to a TabLayout similarly to how a ViewPager was linked to TabLayout. PiperOrigin-RevId: 246496849
1 parent cd24d3f commit 2bb0fa1

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ ext {
3535
recyclerViewSelection : '1.1.0-alpha01',
3636
transition : '1.0.1',
3737
vectorDrawable : '1.1.0-alpha01',
38+
viewpager2 : '1.0.0-alpha02',
3839
]
3940

4041
testRunnerVersion = '1.1.0'
@@ -109,6 +110,8 @@ def compatibility(name) {
109110
return "androidx.vectordrawable:vectordrawable:${androidXVersions.vectorDrawable}"
110111
case "recyclerViewSelection":
111112
return "androidx.recyclerview:recyclerview-selection:${androidXVersions.recyclerViewSelection}"
113+
case "viewpager2":
114+
return "androidx.viewpager2:viewpager2:${androidXVersions.viewpager2}"
112115
default:
113116
throw new IllegalArgumentException("No mapping exists for name: $name.")
114117
}

lib/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ dependencies {
1616
api compatibility("recyclerview")
1717
api compatibility("transition")
1818
api compatibility("vectordrawable")
19+
api compatibility("viewpager2")
1920

2021
testImplementation "androidx.test:core:${project.rootProject.ext.testRunnerVersion}"
2122
testImplementation "androidx.test:runner:${project.rootProject.ext.testRunnerVersion}"

lib/java/com/google/android/material/tabs/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dependencies {
99
implementation compatibility("appcompat")
1010
implementation compatibility("core")
1111
implementation compatibility("core_ui")
12+
implementation compatibility("viewpager2")
1213

1314
implementation project(fromPath("lib/java/com/google/android/material/animation"))
1415
implementation project(fromPath("lib/java/com/google/android/material/internal"))

0 commit comments

Comments
 (0)