From eb5e1b6fe3be5e8819a980d0dda0bc74e7ce835a Mon Sep 17 00:00:00 2001 From: Li Hongyin Date: Mon, 9 Jan 2017 11:13:44 +0800 Subject: [PATCH] update readme --- README.md | 47 ++++++++++++++++++++++------------------------- package.json | 2 +- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 68d6493..1662883 100644 --- a/README.md +++ b/README.md @@ -37,31 +37,28 @@ dependencies { ```java import cn.mandata.react_native_mpchart.MPChartPackage; // <--- import -public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler { - ...... - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - mReactRootView = new ReactRootView(this); - - mReactInstanceManager = ReactInstanceManager.builder() - .setApplication(getApplication()) - .setBundleAssetName("index.android.bundle") - .setJSMainModuleName("index.android") - .addPackage(new MainReactPackage()) - .addPackage(new MPChartPackage()) // <------ add this line to yout MainActivity class - .setUseDeveloperSupport(BuildConfig.DEBUG) - .setInitialLifecycleState(LifecycleState.RESUMED) - .build(); - - mReactRootView.startReactApplication(mReactInstanceManager, "AndroidRNSample", null); - - setContentView(mReactRootView); - } - - ...... - +public class MainActivity extends ReactActivity { + + ...... + + /** + * A list of packages used by the app. If the app uses additional views + * or modules besides the default ones, add more packages here. + */ + @Override + protected List getPackages() { + return Arrays.asList( + new MainReactPackage(), + new ReactNativeIcons(Arrays.asList( + new IconFont("typicons", "typicons.ttf"), + new IconFont("fontawesome", "FontAwesome.otf") + )), + new MPChartPackage(),// <------ add this line to yout MainActivity class + new ManDataLibPackage(), + new BaiduVoiseLibPackage() + ); + } + ...... } ``` diff --git a/package.json b/package.json index 6723f68..c83b0ee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-chart-android", - "version": "1.0.6", + "version": "1.0.8", "description": "react-native-mpchart provide modules to add chart to android,all charts are come from mpandroidchart library.", "main": "index.js", "scripts": {