Commit 337b0e4b by nguyenquangtung004

TODO: Đã fix thành công header home

parent 40431b8d
import { Image, StyleSheet, TextInput, View } from "react-native"; import { Image, SafeAreaView, StatusBar, StyleSheet, TextInput, View } from "react-native";
import React from "react"; import React from "react";
import R from "../../assets/R"; import R from "../../assets/R";
const customHeader = (props) => { const customHeader = (props) => {
...@@ -14,7 +14,11 @@ const customHeader = (props) => { ...@@ -14,7 +14,11 @@ const customHeader = (props) => {
const SearchIcon = R.images.icSearch; const SearchIcon = R.images.icSearch;
return ( return (
<View style={styles.container}> <SafeAreaView style={styles.container}>
<StatusBar
barStyle="light-content"
translucent={false}
/>
<Image <Image
source={pathLogo} source={pathLogo}
style={{ width: width, height: height }} style={{ width: width, height: height }}
...@@ -39,7 +43,7 @@ const customHeader = (props) => { ...@@ -39,7 +43,7 @@ const customHeader = (props) => {
style={styles.input} style={styles.input}
/> />
</View> </View>
</View> </SafeAreaView>
); );
}; };
...@@ -49,7 +53,6 @@ const styles = StyleSheet.create({ ...@@ -49,7 +53,6 @@ const styles = StyleSheet.create({
container: { container: {
flexDirection: "row", flexDirection: "row",
marginHorizontal: 15, marginHorizontal: 15,
maxHeight: 40,
}, },
size_box:{ size_box:{
width: '20%', width: '20%',
...@@ -65,6 +68,7 @@ const styles = StyleSheet.create({ ...@@ -65,6 +68,7 @@ const styles = StyleSheet.create({
borderColor: R.colors.gray280, borderColor: R.colors.gray280,
borderRadius: 100, borderRadius: 100,
borderWidth: 1, borderWidth: 1,
maxHeight:40,
paddingHorizontal: 14, paddingHorizontal: 14,
paddingVertical: 5 paddingVertical: 5
}, },
......
...@@ -8,10 +8,10 @@ import { ...@@ -8,10 +8,10 @@ import {
ScrollView, ScrollView,
TouchableWithoutFeedback, TouchableWithoutFeedback,
Keyboard, Keyboard,
SafeAreaView,
Image, Image,
StatusBar, // FEATURE: Import StatusBar để control status bar StatusBar, // FEATURE: Import StatusBar để control status bar
Platform, // FEATURE: Check platform iOS/Android Platform,
SafeAreaView, // FEATURE: Check platform iOS/Android
} from "react-native"; } from "react-native";
import HeaderCus from "../home/header"; import HeaderCus from "../home/header";
import R from "../../assets/R"; import R from "../../assets/R";
...@@ -111,17 +111,12 @@ const HomeView = (props) => { ...@@ -111,17 +111,12 @@ const HomeView = (props) => {
); );
return ( return (
<SafeAreaView style={styles.container_body}>
<StatusBar
barStyle="light-content"
translucent={false}
/>
<TouchableWithoutFeedback onPress={Keyboard.dismiss} accessible={false}> <TouchableWithoutFeedback onPress={Keyboard.dismiss} accessible={false}>
<View style={[
{ flex: 1 },
]}>
<View style={styles.container_body}> <View style={styles.container_body}>
<ImageBackground <ImageBackground
source={R.images.igBackgroundSlider} source={R.images.igBackgroundSlider}
style={[styles.background_header, { style={[styles.background_header, {
...@@ -151,9 +146,7 @@ const HomeView = (props) => { ...@@ -151,9 +146,7 @@ const HomeView = (props) => {
{renderMenuSection("Dịch vụ trực tuyến", menuDataOnlineSer)} {renderMenuSection("Dịch vụ trực tuyến", menuDataOnlineSer)}
</ScrollView> </ScrollView>
</View> </View>
</View>
</TouchableWithoutFeedback> </TouchableWithoutFeedback>
</SafeAreaView>
); );
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment