Skip to content

Commit 1471f67

Browse files
committed
WIP: Improve example
1 parent 5829840 commit 1471f67

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

example/index.android.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default class Example extends Component {
5252
}
5353

5454
openCustomizedCustomTabs() {
55-
this.openGoogle({
55+
this.openURL("https://www.google.com", {
5656
toolbarColor: "#607D8B",
5757
enableUrlBarHiding: true,
5858
showPageTitle: true,
@@ -69,18 +69,16 @@ export default class Example extends Component {
6969
}
7070

7171
openDefaultCustomTabs() {
72-
this.openGoogle();
72+
this.openURL("https://facebook.github.io/react-native/");
7373
}
7474

75+
// TODO:
7576
errorOccur() {
76-
this.openGoogle("https://www.google.com", {
77-
//toolbarColor: '607D8B', // <--- Invalid toolbar color.
78-
enableUrlBarHiding: "#607D8B", // <-- Type Error.
79-
});
77+
this.openURL("https://www.google.com");
8078
}
8179

82-
openGoogle(option) {
83-
CustomTabs.openURL("https://www.google.com", option)
80+
openURL(url, option) {
81+
CustomTabs.openURL(url, option)
8482
.then(launched => {
8583
console.log(`Launched custom tabs: ${launched}`);
8684
})

0 commit comments

Comments
 (0)