-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
31 lines (26 loc) · 776 Bytes
/
Copy pathApp.js
File metadata and controls
31 lines (26 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import React from 'react';
import { ImageBackground,SafeAreaView, View, Text } from 'react-native';
import Head from './src/home/head'
import Msg from './src/home/msg'
import Note from './src/home/note'
class App extends React.Component{
render() {
return (
// 试试去掉父View中的`flex: 1`。
// 则父View不再具有尺寸,因此子组件也无法再撑开。
// 然后再用`height: 300`来代替父View的`flex: 1`试试看?
<View style={{flex: 1}}>
<View style={{flex: 1}} >
<Head/>
</View>
<View style={{flex: 6}} >
<Msg/>
</View>
<View style={{flex: 8, backgroundColor: 'skyblue'}}>
<Note/>
</View>
</View>
);
}
}
export default App;