Commit 9294c835 authored by Farid from Safi's avatar Farid from Safi

update doc for RN > 0.19

parent a17dee14
......@@ -40,31 +40,15 @@ view needs to fill up the real screen size.
```
import ca.jaysoo.extradimensions.ExtraDimensionsPackage; // <--- import
public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler {
public class MainActivity extends ReactActivity {
......
@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 ExtraDimensionsPackage(this)) // <------ add here
.setUseDeveloperSupport(BuildConfig.DEBUG)
.setInitialLifecycleState(LifecycleState.RESUMED)
.build();
mReactRootView.startReactApplication(mReactInstanceManager, "ExampleRN", null);
setContentView(mReactRootView);
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new ExtraDimensionsPackage(this) // <--- add here
);
}
......
}
```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment