mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-06 22:37:14 +08:00
'RCTRootView's size flexibility' UIExplorer demo
Reviewed By: javache Differential Revision: D2622491 fb-gh-sync-id: de79a96ee0fef432bbd0512eba8994719a0adad3
This commit is contained in:
committed by
facebook-github-bot-2
parent
f1712b0cc3
commit
d5209a0829
@@ -24,6 +24,7 @@ var {
|
||||
|
||||
var requireNativeComponent = require('requireNativeComponent');
|
||||
var UpdatePropertiesExampleView = requireNativeComponent('UpdatePropertiesExampleView');
|
||||
var FlexibleSizeExampleView = requireNativeComponent('FlexibleSizeExampleView');
|
||||
|
||||
class AppPropertiesUpdateExample extends React.Component {
|
||||
render() {
|
||||
@@ -42,6 +43,23 @@ class AppPropertiesUpdateExample extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
class RootViewSizeFlexibilityExample extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text style={styles.text}>
|
||||
Press the button to resize it. On resize, RCTRootViewDelegate is notified. You can use it to handle content size updates.
|
||||
</Text>
|
||||
<FlexibleSizeExampleView style={styles.nativeView}>
|
||||
<Text style={styles.text}>
|
||||
Error: This demo is accessible only from UIExplorer app
|
||||
</Text>
|
||||
</FlexibleSizeExampleView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
var styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
@@ -63,7 +81,15 @@ exports.examples = [
|
||||
title: 'Updating app properties in runtime',
|
||||
render(): React.Component {
|
||||
return (
|
||||
<AppPropertiesUpdateExample />
|
||||
<AppPropertiesUpdateExample/>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'RCTRootView\'s size flexibility',
|
||||
render(): React.Component {
|
||||
return (
|
||||
<RootViewSizeFlexibilityExample/>
|
||||
);
|
||||
},
|
||||
}];
|
||||
|
||||
Reference in New Issue
Block a user