[fix] AppRegistry container layout

Absolute fill positioning provides better default layout for full-screen
apps.

Fix #528
This commit is contained in:
Nicolas Gallagher
2017-06-20 10:17:55 -07:00
parent a264c0b956
commit 4cfcdef264
3 changed files with 5 additions and 2 deletions
+3
View File
@@ -40,6 +40,9 @@ Runs the application that was registered under `appKey`. The `appParameters`
must include the `rootTag` into which the application is rendered, and
optionally any `initialProps`.
On web, if the `rootTag` is a sub-section of your application it should be
styled as `position:relative` and given an explicit height.
static **unmountApplicationComponentAtRootTag**(rootTag: HTMLElement)
To "stop" an application when a view should be destroyed, call
+1 -1
View File
@@ -48,7 +48,7 @@ export default class AppContainer extends Component {
render() {
return (
<View pointerEvents="box-none" style={styles.appContainer}>
<View pointerEvents="box-none" style={[styles.appContainer, StyleSheet.absoluteFill]}>
<View
children={this.props.children}
key={this.state.mainKey}
+1 -1
View File
@@ -152,7 +152,7 @@ const createReducer = (style, styleProps) => {
resolvedStyle.flexShrink = 0;
}
if (style.flexBasis == null) {
resolvedStyle.flexBasis = 'auto'
resolvedStyle.flexBasis = 'auto';
}
}
break;