简体   繁体   中英

How can React-Native textInput component can be modified?

React-native offers developing native modules and UI components in its official site .

However I want to make minor changes in the TextInput component which is used in my app and is found on my computer. However there is no a Java file that is related with TextInput .

Is there any way to make small changes in TextInput in my app?

Since RN v0.21.0

The distribution of Android files have changed and is now done with npm.

The files can be found under node_modules/react-native/android/com/facebook/react/react-native/0.21.0/ in a the archive react-native-0.21.0-sources.jar

They can't be changed just like this, thought you can have a look at this

Edit : Works with RN 0.20.0 or lower

I guess what you're looking for is this file

You can modify it in your react-native folder under node_modules :

node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/

In order to apply changes to React Native android source and have them in the app, you have to compile it from source .

You can follow the official guide: https://facebook.github.io/react-native/docs/android-building-from-source.html#content

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM