Skip to content

Commit 09bcf2d

Browse files
committed
chore: change package name
1 parent 5ad6ffe commit 09bcf2d

14 files changed

+15
-193
lines changed

.flowconfig

Lines changed: 0 additions & 84 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,15 @@
1-
# react-native-viewpager <img src="docs/viewpager-logo.png" alt="ViewPager" width="24" height="24">
2-
3-
[![CircleCI branch](https://img.shields.io/circleci/build/github/callstack/react-native-viewpager/master.svg)](https://circleci.com/gh/callstack/react-native-viewpager/tree/master)
4-
[![npm package](https://badge.fury.io/js/%40react-native-community%2Fviewpager.svg)](https://badge.fury.io/js/%40react-native-community%2Fviewpager)
5-
[![Lean Core Extracted](https://img.shields.io/badge/Lean%20Core-Extracted-brightgreen.svg)](https://github.com/facebook/react-native/issues/23313)
6-
[![License](https://img.shields.io/github/license/react-native-community/react-native-viewpager?color=blue)](https://github.com/callstack/react-native-viewpager/blob/master/LICENSE)
7-
8-
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)
9-
10-
<br/>
11-
<p align="center">
12-
<img src="docs/vp-carousel.gif" alt="ViewPager" width="300">
13-
</p>
14-
15-
<br/>
16-
17-
## Versions
18-
19-
| 3.x | ~~4.0.x, 4.1.x~~ | >= 4.2.x | 5.x
20-
| ------------- | ------------- | ------------- | ------------- |
21-
| 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 |
1+
# react-native-pager-view <img src="docs/viewpager-logo.png" alt="ViewPager" width="24" height="24">
232

243
## Getting started
254

26-
`yarn add @react-native-community/viewpager`
27-
28-
## Linking
29-
30-
### >= 0.60
31-
32-
Autolinking will just do the job.
33-
34-
### < 0.60
35-
36-
#### Mostly automatic
37-
38-
`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')
64-
```
65-
66-
#### `android/app/build.gradle`
67-
68-
```groovy
69-
dependencies {
70-
...
71-
implementation project(':@react-native-community_viewpager')
72-
}
73-
```
74-
75-
#### `android/app/src/main/.../MainApplication.java`
76-
77-
On top, where imports are:
78-
79-
```java
80-
import com.reactnativecommunity.viewpager.RNCViewPagerPackage;
81-
```
82-
83-
Add the `RNCViewPagerPackage` class to your list of exported packages.
84-
85-
```java
86-
@Override
87-
protected List<ReactPackage> getPackages() {
88-
return Arrays.<ReactPackage>asList(
89-
new MainReactPackage(),
90-
new RNCViewPagerPackage()
91-
);
92-
}
93-
```
94-
95-
</details>
5+
`yarn add react-native-pager-view`
966

977
## Usage
988

999
```js
10010
import React from 'react';
10111
import {StyleSheet, View, Text} from 'react-native';
102-
import ViewPager from '@react-native-community/viewpager';
12+
import ViewPager from 'react-native-pager-view';
10313

10414
const MyPager = () => {
10515
return (
@@ -124,10 +34,6 @@ const styles = StyleSheet.create({
12434
**Attention:** Note that you can only use `View` components as children of `ViewPager` (cf. folder */example*)
12535
. 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
12636

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)
130-
13137
## API
13238

13339
|Prop|Description|Platform|

example/src/BasicViewPagerExample.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useMemo } from 'react';
22
import { Image, StyleSheet, View, SafeAreaView, Animated } from 'react-native';
33

4-
import ViewPager from '@react-native-community/viewpager';
4+
import ViewPager from 'react-native-pager-view';
55

66
import { LikeCount } from './component/LikeCount';
77
import { NavigationPanel } from './component/NavigationPanel';

example/src/HeadphonesCarouselExample.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
ImageRequireSource,
1818
} from 'react-native';
1919
import type { ViewPagerOnPageScrollEventData } from 'src/types';
20-
import ViewPager from '@react-native-community/viewpager';
20+
import ViewPager from 'react-native-pager-view';
2121

2222
const data = [
2323
{

example/src/KeyboardExample.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
Animated,
1212
} from 'react-native';
1313
import { Colors } from 'react-native/Libraries/NewAppScreen';
14-
import ViewPager from '@react-native-community/viewpager';
14+
import ViewPager from 'react-native-pager-view';
1515
import { logoUrl } from './utils';
1616

1717
import { NavigationPanel } from './component/NavigationPanel';

example/src/OnPageScrollExample.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { StyleSheet, Text, View, SafeAreaView, Animated } from 'react-native';
3-
import ViewPager from '@react-native-community/viewpager';
3+
import ViewPager from 'react-native-pager-view';
44
import { ScrollView, TouchableOpacity } from 'react-native-gesture-handler';
55
import { ProgressBar } from './component/ProgressBar';
66
import { useNavigationPanel } from './hook/useNavigationPanel';

example/src/OnPageSelectedExample.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
Animated,
1010
} from 'react-native';
1111

12-
import ViewPager from '@react-native-community/viewpager';
12+
import ViewPager from 'react-native-pager-view';
1313
import { NavigationPanel } from './component/NavigationPanel';
1414
import { useNavigationPanel } from './hook/useNavigationPanel';
1515

example/src/PaginationDotsExample.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
} from 'react-native';
1010
import ViewPager, {
1111
ViewPagerOnPageScrollEventData,
12-
} from '@react-native-community/viewpager';
12+
} from 'react-native-pager-view';
1313

1414
import {
1515
ScalingDot,

example/src/ScrollViewInsideExample.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import ViewPager from '@react-native-community/viewpager';
1+
import ViewPager from 'react-native-pager-view';
22
import React from 'react';
33
import { useState } from 'react';
44
import { View, StyleSheet, Button, ScrollView, Animated } from 'react-native';

example/src/ScrollableViewPagerExample.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import ViewPager from '@react-native-community/viewpager';
1+
import ViewPager from 'react-native-pager-view';
22
import React from 'react';
33
import { ScrollView, View, Image, StyleSheet, Animated } from 'react-native';
44
import { NavigationPanel } from './component/NavigationPanel';

0 commit comments

Comments
 (0)