heng
heng
首先按照官网文档的步骤来做: [1. Create the ViewManager subclass](http://facebook.github.io/react-native/docs/native-components-android.html#1-create-the-viewmanager-subclass) [2. Implement method createViewInstance](http://facebook.github.io/react-native/docs/native-components-android.html#2-implement-method-createviewinstance) [3. Expose view property setters using @ReactProp (or @ReactPropGroup) annotation](http://facebook.github.io/react-native/docs/native-components-android.html#3-expose-view-property-setters-using-reactprop-or-reactpropgroup-annotation) [4. Register the ViewManager](http://facebook.github.io/react-native/docs/native-components-android.html#4-register-the-viewmanager) [5. Implement the JavaScript module](http://facebook.github.io/react-native/docs/native-components-android.html#5-implement-the-javascript-module) 在native组件只有设置属性的时很按照上面的来做很容易就搞定了,但是实际开发中既然是组件,肯定会有相应的事件监听处理和外部调用的方法。...