Skip to content

Rn51upgrade #70

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ android {
ndk {
abiFilters "armeabi-v7a", "x86"
}
renderscriptTargetApi 21
renderscriptSupportModeEnabled true
}
splits {
abi {
Expand Down
5 changes: 2 additions & 3 deletions android/app/src/main/java/com/uilib/MainApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.support.annotation.Nullable;

import com.cmcewen.blurview.BlurViewPackage;
import com.facebook.react.ReactPackage;
import com.reactnativenavigation.NavigationApplication;
import com.wix.reactnativeuilib.highlighterview.HighlighterViewPackage;
Expand All @@ -10,8 +11,6 @@
import java.util.Arrays;
import java.util.List;

//import com.wix.interactable.Interactable;

public class MainApplication extends NavigationApplication {
@Override
public boolean isDebug() {
Expand All @@ -23,8 +22,8 @@ public boolean isDebug() {
public List<ReactPackage> createAdditionalReactPackages() {
return Arrays.<ReactPackage>asList(
new TextInputDelKeyHandlerPackage(),
new BlurViewPackage(),
new HighlighterViewPackage()
// new Interactable()
);
}
}
143 changes: 140 additions & 3 deletions ios/uilib.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,69 @@
remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
remoteInfo = uilib;
};
067D853D1FFBD2100038846C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3DBE0D001F3B181A0099AA32;
remoteInfo = fishhook;
};
067D853F1FFBD2100038846C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32;
remoteInfo = "fishhook-tvOS";
};
067D854F1FFBD2100038846C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 139D7ECE1E25DB7D00323FB7;
remoteInfo = "third-party";
};
067D85511FFBD2100038846C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D383D3C1EBD27B6005632C8;
remoteInfo = "third-party-tvOS";
};
067D85531FFBD2100038846C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 139D7E881E25C6D100323FB7;
remoteInfo = "double-conversion";
};
067D85551FFBD2100038846C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D383D621EBD27B9005632C8;
remoteInfo = "double-conversion-tvOS";
};
067D85571FFBD2100038846C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 9936F3131F5F2E4B0010BF04;
remoteInfo = privatedata;
};
067D85591FFBD2100038846C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 9936F32F1F5F2E5B0010BF04;
remoteInfo = "privatedata-tvOS";
};
067D855F1FFBD2100038846C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 58CA453CF9884711B2FC29AF /* RNBlur.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 64D1BD361EEFE88700F3F219;
remoteInfo = "RNBlur-tvOS";
};
139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
Expand Down Expand Up @@ -394,6 +457,8 @@
children = (
139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
8EB68AB61E4B57C200F5CA08 /* libRCTWebSocket-tvOS.a */,
067D853E1FFBD2100038846C /* libfishhook.a */,
067D85401FFBD2100038846C /* libfishhook-tvOS.a */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -424,6 +489,12 @@
8EE25FC11EAE57C300CBF596 /* libcxxreact.a */,
8EE25FC31EAE57C300CBF596 /* libjschelpers.a */,
8EE25FC51EAE57C300CBF596 /* libjschelpers.a */,
067D85501FFBD2100038846C /* libthird-party.a */,
067D85521FFBD2100038846C /* libthird-party.a */,
067D85541FFBD2100038846C /* libdouble-conversion.a */,
067D85561FFBD2100038846C /* libdouble-conversion.a */,
067D85581FFBD2100038846C /* libprivatedata.a */,
067D855A1FFBD2100038846C /* libprivatedata-tvOS.a */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -527,7 +598,7 @@
isa = PBXGroup;
children = (
8EEDAA4C1E6723E8007266C9 /* libRNBlur.a */,
D8D93EAB20161B4600A39331 /* libRNBlur.a */,
067D85601FFBD2100038846C /* libRNBlur.a */,
);
name = Products;
sourceTree = "<group>";
Expand All @@ -550,7 +621,10 @@
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
00E356ED1AD99517003FC87E /* uilibTests */ = {
00E356ED1AD99


7003FC87E /* uilibTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "uilibTests" */;
buildPhases = (
Expand Down Expand Up @@ -725,6 +799,69 @@
remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
067D853E1FFBD2100038846C /* libfishhook.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libfishhook.a;
remoteRef = 067D853D1FFBD2100038846C /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
067D85401FFBD2100038846C /* libfishhook-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libfishhook-tvOS.a";
remoteRef = 067D853F1FFBD2100038846C /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
067D85501FFBD2100038846C /* libthird-party.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libthird-party.a";
remoteRef = 067D854F1FFBD2100038846C /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
067D85521FFBD2100038846C /* libthird-party.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libthird-party.a";
remoteRef = 067D85511FFBD2100038846C /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
067D85541FFBD2100038846C /* libdouble-conversion.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libdouble-conversion.a";
remoteRef = 067D85531FFBD2100038846C /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
067D85561FFBD2100038846C /* libdouble-conversion.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libdouble-conversion.a";
remoteRef = 067D85551FFBD2100038846C /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
067D85581FFBD2100038846C /* libprivatedata.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libprivatedata.a;
remoteRef = 067D85571FFBD2100038846C /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
067D855A1FFBD2100038846C /* libprivatedata-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libprivatedata-tvOS.a";
remoteRef = 067D85591FFBD2100038846C /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
067D85601FFBD2100038846C /* libRNBlur.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRNBlur.a;
remoteRef = 067D855F1FFBD2100038846C /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
Expand Down Expand Up @@ -941,7 +1078,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
};
/* End PBXShellScriptBuildPhase section */

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package com.wix.reactnativeuilib.textinput;

import android.util.Log;
import android.view.View;

import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.uimanager.IllegalViewOperationException;
import com.facebook.react.uimanager.NativeViewHierarchyManager;
import com.facebook.react.uimanager.UIBlock;
import com.facebook.react.uimanager.UIManagerModule;
Expand All @@ -30,10 +32,19 @@ public void register(final Integer textInputTag) {

uiManager.addUIBlock(new UIBlock() {
public void execute(NativeViewHierarchyManager viewHierarchyManager) {
final View view = viewHierarchyManager.resolveView(textInputTag);
Log.d("ReactNativeJS","registering tag = " + textInputTag);
final View view;
try {
view = viewHierarchyManager.resolveView(textInputTag);
} catch (IllegalViewOperationException e) {
Log.d("ReactNativeJS","no view for tag = " + textInputTag);
e.printStackTrace();
return;
}
final ReactEditText editText = ViewUtils.getEditTextInView(view);

if (editText != null) {
Log.d("ReactNativeJS","has editText for tag = " + textInputTag);
final KeyListenerProxy keyListenerProxy = new KeyListenerProxy(reactContext, editText.getKeyListener());
editText.setKeyListener(keyListenerProxy);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ public List<NativeModule> createNativeModules(ReactApplicationContext reactConte
return Arrays.<NativeModule>asList(new TextInputDelKeyHandlerModule(reactContext));
}

// Deprecated in RN 0.47
public List<Class<? extends JavaScriptModule>> createJSModules() {
return Collections.emptyList();
}
// @Override
// public List<Class<? extends JavaScriptModule>> createJSModules() {
// return Collections.emptyList();
// }

@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@
"gatsby": "^1.9.128",
"gh-pages": "^1.1.0",
"jest": "^20.0.4",
"react": "16.0.0-alpha.6",
"react": "16.0.0",
"react-addons-test-utils": "^15.4.2",
"react-autobind": "^1.0.6",
"react-dom": "^15.4.2",
"react-native": "0.44.2",
"react-native-keyboard-aware-scrollview": "^1.1.6",
"react-native": "0.51.0",
"react-native-keyboard-aware-scrollview": "^2.0.0",
"react-native-navigation": "^1.1.19"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/components/inputs/TextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ export default class TextInput extends BaseInput {
const underlineStyle = this.getUnderlineStyle();

return (
<View style={[this.styles.container, containerStyle]}>
<View style={[this.styles.container, containerStyle]} collapsable={false}>
<View style={[this.styles.innerContainer, underlineStyle]}>
{this.renderPlaceholder()}
{expandable ? this.renderExpandableInput() : this.renderTextInput()}
Expand Down
3 changes: 2 additions & 1 deletion src/components/tagsInput/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ export default class TagsInput extends BaseComponent {
return (
<View style={styles.inputWrapper}>
<TextInput
ref={r => (this.input = r)}
ref={r => this.input = r}
text80
blurOnSubmit={false}
{...others}
Expand All @@ -288,6 +288,7 @@ export default class TagsInput extends BaseComponent {
selectionColor={isLastTagMarked ? 'transparent' : undefined}
style={inputStyle}
containerStyle={{flexGrow: 0}}
collapsable={false}
/>
</View>
);
Expand Down