ReactNative Demo - 仿攜程UI Demo
import React, {
Component
} from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
Image,
DrawerLayoutAndroid,
ListView,
PixelRatio,
} from 'react-native';
class AwesomeProject extends Component {
render() {
return (
<View style={styles.flex}>
<View style={styles.container}>
<View style={[styles.item, styles.center,styles.flex]}>
<Text style={[styles.font]}>酒店</Text>
</View>
<View style={[styles.item,styles.lineLeftRight]}>
<View style={[styles.center,styles.flex,styles.lineCenter]}>
<Text style={[styles.font]}>海外酒店</Text>
</View>
<View style={[styles.center,styles.flex]}>
<Text style={[styles.font]}>優惠酒店</Text>
</View>
</View>
<View style={[styles.item]}>
<View style={[styles.center,styles.flex,styles.lineCenter]}>
<Text style={[styles.center,styles.font]}>團購</Text>
</View>
<View style={[styles.center,styles.flex]}>
<Text style={[styles.font]}>客棧,公寓</Text>
</View>
</View>
</View>
</View>
);
}
}
const styles = StyleSheet.create({
flex: {
flex:1,
},
container: {
marginRight: 5,
marginLeft: 5,
marginTop: 200,
flexDirection: 'row',
backgroundColor: '#fff',
backgroundColor: '#ff0067',
borderColor:'red',
padding:2,
borderRadius: 5,
height:84,
},
lineLeftRight: {
borderLeftWidth: 1/PixelRatio.get(),
borderRightWidth: 1/PixelRatio.get(),
borderColor: '#fff',
},
font:{
fontSize:16,
color: 'white',
fontWeight: 'bold',
},
lineCenter:{
borderBottomWidth:1/PixelRatio.get(),
borderColor: '#fff'
},
item:{
flex: 1,
height: 80,
},
center: {
justifyContent: 'center',
alignItems: 'center',
},
});
AppRegistry.registerComponent('AwesomeProject', () => AwesomeProject);
相關文章
- ReactNative 仿網易新聞UI DemoReactUI
- ReactNative Demo -SearchInputReact
- ReactNative Demo - ImageVIew 使用ReactView
- ReactNative Demo - Dimensions 的使用React
- ReactNative Demo - NavigationView 使用ReactNavigationView
- ReactNative Demo - Navigator 使用React
- 仿微信錄音控制元件Demo控制元件
- vue-仿手機qq的demoVue
- 仿PS的JS調色盤DemoJS
- Flutter 仿攜程旅行 APPFlutterAPP
- demo
- ReactNative仿《ONE》APPReactAPP
- /*動態執行儲存過程DEMO*/儲存過程
- nginx demoNginx
- Fragment demoFragment
- XACML DEMOACM
- Object-C,NumberDemo和StringDemoObject
- 【HarmonyOS】【Demo】【JAVA UI】 鴻蒙怎麼在Webview上新增元件JavaUI鴻蒙WebView元件
- android ui介面設計開發demo-智慧社群ui設計展示AndroidUI
- Golang RabbitMQ DemoGolangMQ
- 學習demo
- WebGL-DemoWeb
- IOSAnimationDemoiOS
- Java RMI DemoJava
- CompletableFuture Demo
- 小記 Demo
- 記寫 android 微信登入的demo歷程Android
- 短視訊平臺搭建,仿製一個登陸介面的demo
- ReactNative仿某租車軟體React
- Java SPI及DemoJava
- laravel佇列demoLaravel佇列
- 理解Flutter Demo AppFlutterAPP
- java多型demoJava多型
- JsonWebToken Demo(轉)JSONWeb
- JavaScript(購物Demo)JavaScript
- Mybatis批量操作demoMyBatis
- RxSwift小DemoSwift
- ionic入門demo