Added a toolbar to the example app
This commit is contained in:
parent
89cde021d8
commit
18e33eba73
|
@ -7,6 +7,7 @@ var {
|
||||||
NativeModules,
|
NativeModules,
|
||||||
TouchableNativeFeedback,
|
TouchableNativeFeedback,
|
||||||
ScrollView,
|
ScrollView,
|
||||||
|
ToolbarAndroid,
|
||||||
} = React;
|
} = React;
|
||||||
|
|
||||||
import DialogAndroid from 'react-native-dialogs';
|
import DialogAndroid from 'react-native-dialogs';
|
||||||
|
@ -14,9 +15,6 @@ import DialogAndroid from 'react-native-dialogs';
|
||||||
import dialogData from './dialogData.js';
|
import dialogData from './dialogData.js';
|
||||||
import {MKButton } from 'react-native-material-kit';
|
import {MKButton } from 'react-native-material-kit';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class ExampleApp extends React.Component {
|
class ExampleApp extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
@ -54,11 +52,14 @@ class ExampleApp extends React.Component {
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<View style={{flex:1}}>
|
||||||
|
<ToolbarAndroid title="React Native Dialogs" style={styles.toolbar} titleColor="#ddd"/>
|
||||||
<ScrollView>
|
<ScrollView>
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
{dialogs}
|
{dialogs}
|
||||||
</View>
|
</View>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -82,7 +83,11 @@ var styles = StyleSheet.create({
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
color: '#333333',
|
color: '#333333',
|
||||||
marginBottom: 5,
|
marginBottom: 5,
|
||||||
}
|
},
|
||||||
|
toolbar: {
|
||||||
|
backgroundColor: '#311B92',
|
||||||
|
height: 56,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
AppRegistry.registerComponent('ExampleApp', () => ExampleApp);
|
AppRegistry.registerComponent('ExampleApp', () => ExampleApp);
|
||||||
|
|
Loading…
Reference in New Issue