Skip to content

Commit e5906f5

Browse files
committed
make ReactToolbar backward compatible with RN < 0.65
1 parent 66969ab commit e5906f5

File tree

14 files changed

+94
-12
lines changed

14 files changed

+94
-12
lines changed

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ npx pod-install
2727
react-native link @react-native-community/toolbar-android
2828
```
2929

30-
Note: `@react-native-community/[email protected]` supports `[email protected]` and up. For earlier version of react-native, please use `@react-native-community/[email protected]`
31-
3230
### Manual installation
3331

3432
<details>

android/src/main/java/com/reactnativecommunity/toolbarandroid/ReactToolbar.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public QualityInfo getQualityInfo() {
130130
return null;
131131
}
132132

133-
@Override
133+
// to be compatible with RN-0.65/fresco-2.5
134134
public Map<String, Object> getExtras() {
135135
return null;
136136
}

example/ToolbarAndroidExample-061/yarn.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -949,8 +949,8 @@
949949
prettier "1.16.4"
950950

951951
"@react-native-community/toolbar-android@file:../../react-native-community-toolbar-android-current.tgz":
952-
version "0.1.0-rc.1"
953-
resolved "file:../../react-native-community-toolbar-android-current.tgz#d88a050f13df0c50eb03bb2e993d1ebbf6483751"
952+
version "0.2.0"
953+
resolved "file:../../react-native-community-toolbar-android-current.tgz#77d7a9981bc9d01cd00954b39460a17e06d24573"
954954

955955
"@types/babel__core@^7.1.0":
956956
version "7.1.3"

example/ToolbarAndroidExample-065/ToolbarAndroidExample/ToolbarAndroidExample.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default class ToolbarAndroidExample extends Component<Props, State> {
3939
<View style={styles.container}>
4040
<ToolbarAndroid
4141
navIcon={require('./ic_menu_black_24dp.png')}
42-
title="ToolbarAndroid Example"
42+
title="ToolbarAndroid Example (RN-0.65)"
4343
style={styles.toolbar}
4444
actions={[
4545
{title: 'Button', icon: require('./relay.png'), show: 'always'},

example/ToolbarAndroidExample-065/__tests__/App-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import 'react-native';
66
import React from 'react';
7-
import App from '../App';
7+
import App from '../ToolbarAndroidExample';
88

99
// Note: test renderer must be required after react-native.
1010
import renderer from 'react-test-renderer';

example/ToolbarAndroidExample-065/android/.project

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>android__</name>
3+
<name>ToolbarAndroidExample</name>
44
<comment>Project android__ created by Buildship.</comment>
55
<projects>
66
</projects>
@@ -16,7 +16,7 @@
1616
</natures>
1717
<filteredResources>
1818
<filter>
19-
<id>1630614539695</id>
19+
<id>0</id>
2020
<name></name>
2121
<type>30</type>
2222
<matcher>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
4+
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
5+
<classpathentry kind="output" path="bin/default"/>
6+
</classpath>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>ToolbarAndroidExample-app</name>
4+
<comment>Project ToolbarAndroidExample-app created by Buildship.</comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>org.eclipse.jdt.core.javanature</nature>
21+
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
22+
</natures>
23+
<filteredResources>
24+
<filter>
25+
<id>1630694511090</id>
26+
<name></name>
27+
<type>30</type>
28+
<matcher>
29+
<id>org.eclipse.core.resources.regexFilterMatcher</id>
30+
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
31+
</matcher>
32+
</filter>
33+
</filteredResources>
34+
</projectDescription>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
connection.project.dir=..
2+
eclipse.preferences.version=1

example/ToolbarAndroidExample-065/yarn.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@
11681168

11691169
"@react-native-community/toolbar-android@file:../../react-native-community-toolbar-android-current.tgz":
11701170
version "0.2.0"
1171-
resolved "file:../../react-native-community-toolbar-android-current.tgz#ff39777d908e0f6b8d2ac231d58907e9b323de1f"
1171+
resolved "file:../../react-native-community-toolbar-android-current.tgz#4d5daa9ca756c0f465db44766dfbbf9aa38f6730"
11721172

11731173
"@react-native/[email protected]":
11741174
version "1.0.0"

example/ToolbarAndroidExample-expo-063/android/.project

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>android_</name>
3+
<name>ToolbarAndroidExampleexpo063</name>
44
<comment>Project android_ created by Buildship.</comment>
55
<projects>
66
</projects>
@@ -16,7 +16,7 @@
1616
</natures>
1717
<filteredResources>
1818
<filter>
19-
<id>1630614539693</id>
19+
<id>0</id>
2020
<name></name>
2121
<type>30</type>
2222
<matcher>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
4+
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
5+
<classpathentry kind="output" path="bin/default"/>
6+
</classpath>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>ToolbarAndroidExampleexpo063-app</name>
4+
<comment>Project ToolbarAndroidExampleexpo063-app created by Buildship.</comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>org.eclipse.jdt.core.javanature</nature>
21+
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
22+
</natures>
23+
<filteredResources>
24+
<filter>
25+
<id>1630694511165</id>
26+
<name></name>
27+
<type>30</type>
28+
<matcher>
29+
<id>org.eclipse.core.resources.regexFilterMatcher</id>
30+
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
31+
</matcher>
32+
</filter>
33+
</filteredResources>
34+
</projectDescription>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
connection.project.dir=..
2+
eclipse.preferences.version=1

0 commit comments

Comments
 (0)