You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This component allows the user to swipe left and right through pages of data. Under the hood it is using the native [Android ViewPager](https://developer.android.com/reference/android/support/v4/view/ViewPager) and the [iOS UIPageViewController](https://developer.apple.com/documentation/uikit/uipageviewcontroller) implementations. [See it in action!](https://github.com/react-native-community/react-native-viewpager#preview)
| iOS support | Deprecated | iOS support | iOS support |
22
-
| ViewPager1 support | Deprecated |[Reverted to 3.3.0](https://github.com/callstack/react-native-viewpager/issues/233#issue-711000654)| ViewPager2 support |
`react-native link @react-native-community/viewpager`
39
-
40
-
#### Manual linking
41
-
42
-
<details>
43
-
<summary>Manually link the library on iOS</summary>
44
-
</br>
45
-
46
-
Follow the [instructions in the React Native documentation](https://facebook.github.io/react-native/docs/linking-libraries-ios#manual-linking) to manually link the framework or link using [Cocoapods](https://cocoapods.org) by adding this to your `Podfile`:
47
-
48
-
```ruby
49
-
pod 'react-native-viewpager', :path => '../node_modules/@react-native-community/viewpager'
50
-
```
51
-
52
-
</details>
53
-
54
-
<details>
55
-
<summary>Manually link the library on Android</summary>
56
-
</br>
57
-
Make the following changes:
58
-
59
-
#### `android/settings.gradle`
60
-
61
-
```groovy
62
-
include ':@react-native-community_viewpager'
63
-
project(':@react-native-community_viewpager').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/viewpager/android')
**Attention:** Note that you can only use `View` components as children of `ViewPager` (cf. folder */example*)
125
35
. For Android if `View` has own children, set prop `collapsable` to false <https://reactnative.dev/docs/view#collapsable>, otherwise react-native might remove those children views and and it's children will be rendered as separate pages
126
36
127
-
## Advanced usage
128
-
129
-
For advanced usage please take a look into our [example project](https://github.com/callstack/react-native-viewpager/blob/master/example/src/BasicViewPagerExample.tsx)
0 commit comments