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
[Chrome Custom Tabs](https://developer.chrome.com/multidevice/android/customtabs) for React Native.
5
+
[Chrome Custom Tabs](https://developer.chrome.com/multidevice/android/customtabs) for React Native.
6
+
7
+

8
+
5
9
Custom Tabs is supported only for Android, so the behavior on each platform is bellow.
6
10
7
-
* Android
8
-
If Chrome is installed, open the URL in Chrome that you have customized some of the look & feel. If it is not installed, open in other browser.
11
+
- Android
12
+
If Chrome is installed, open the URL in Chrome that you have customized some of the look & feel. If it is not installed, open in other browser.
9
13
10
-
* iOS
11
-
If Chrome is installed, open the URL in it. If it is not installed, open in Safari.
14
+
- iOS
15
+
If Chrome is installed, open the URL in it. If it is not installed, open in Safari.
12
16
13
17
Customization and detailed behavior refer to the [Usage](#Usage).
14
18
15
19
## Installation
16
20
17
21
```
22
+
yarn add react-native-custom-tabs
23
+
or
18
24
npm install react-native-custom-tabs --save
19
25
```
20
26
21
-
To link the native module automatically, it is recommended that you use the [rnpm](https://github.com/rnpm/rnpm).
27
+
Link your native dependencies:
22
28
23
29
```
24
-
rnpm link
30
+
react-native link react-native-custom-tabs
25
31
```
26
32
27
33
#### Android
28
34
29
-
In Android, Add it in your **root**`build.gradle`([e.g. example](https://github.com/droibit/react-native-custom-tabs/blob/develop/example/android/build.gradle)) at the end of repositories:
35
+
In Android, Add it in your **root**`build.gradle` at the end of repositories:
30
36
31
37
```groovy
32
38
allprojects {
@@ -37,35 +43,22 @@ allprojects {
37
43
}
38
44
```
39
45
40
-
And, provide `CustomTabsPackage` in your Application class.
|enableUrlBarHiding|boolean|undefined|Enables the url bar to hide as the user scrolls down on the page.|
119
-
|showPageTitle|boolean|undefined|Sets whether the title should be shown in the custom tab.|
120
-
|enableDefaultShare|boolean|undefined|Whether to add a default shared items of the menu.|
121
-
|animations|Object|undefined|Sets the exit and start animations. ANIMATIONS_FADE, ANIMATIONS_SLIDE or custom object with string properties `startEnter`, `startExit`, `endEnter` and `endExit` each defining an Android animation resource ID to use for the animations, such as `slide_in_right`.|
122
-
|headers|Object|undefined|Sets any custom headers that should be used.|
123
-
|forceCloseOnRedirection|boolean|undefined|Workaround that Custom Tabs doesn't close on redirecting back to app scheme.([#11](https://github.com/droibit/react-native-custom-tabs/pull/11))|
| enableUrlBarHiding | boolean | undefined | Enables the url bar to hide as the user scrolls down on the page. |
113
+
| showPageTitle | boolean | undefined | Sets whether the title should be shown in the custom tab. |
114
+
| enableDefaultShare | boolean | undefined | Whether to add a default shared items of the menu. |
115
+
| animations | Object | undefined | Sets the exit and start animations. ANIMATIONS_FADE, ANIMATIONS_SLIDE or custom object with string properties `startEnter`, `startExit`, `endEnter` and `endExit` each defining an Android animation resource ID to use for the animations, such as `slide_in_right`. |
116
+
| headers | Object | undefined | Sets any custom headers that should be used. |
117
+
| forceCloseOnRedirection | boolean | undefined | Workaround that Custom Tabs doesn't close on redirecting back to app scheme.([#11](https://github.com/droibit/react-native-custom-tabs/pull/11)) |
125
118
126
119
`undefined` property is default behavior of the Custom Tabs.
127
120
128
-
Customize and default look & feel.
129
-

130
-
131
121
## License
132
122
133
123
Copyright (C) 2015 The Android Open Source Project
0 commit comments