Commit a97072be by Giang Tran

update picker uni

parent 0789f387
...@@ -4,6 +4,7 @@ import android.app.Application; ...@@ -4,6 +4,7 @@ import android.app.Application;
import android.content.Context; import android.content.Context;
import com.facebook.react.PackageList; import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication; import com.facebook.react.ReactApplication;
import com.oblador.vectoricons.VectorIconsPackage;
import io.invertase.firebase.RNFirebasePackage; import io.invertase.firebase.RNFirebasePackage;
import com.oblador.vectoricons.VectorIconsPackage; import com.oblador.vectoricons.VectorIconsPackage;
import com.facebook.react.ReactInstanceManager; import com.facebook.react.ReactInstanceManager;
......
rootProject.name = 'Invest' rootProject.name = 'Invest'
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
include ':react-native-firebase' include ':react-native-firebase'
project(':react-native-firebase').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase/android') project(':react-native-firebase').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase/android')
include ':react-native-vector-icons' include ':react-native-vector-icons'
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
</dict> </dict>
</dict> </dict>
<key>NSLocationWhenInUseUsageDescription</key> <key>NSLocationWhenInUseUsageDescription</key>
<string></string> <string/>
<key>NSPhotoLibraryUsageDescription</key> <key>NSPhotoLibraryUsageDescription</key>
<string>To upload images</string> <string>To upload images</string>
<key>UIAppFonts</key> <key>UIAppFonts</key>
......
...@@ -85,6 +85,8 @@ target 'Invest' do ...@@ -85,6 +85,8 @@ target 'Invest' do
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
target 'InvestTests' do target 'InvestTests' do
inherit! :complete inherit! :complete
# Pods for testing # Pods for testing
......
...@@ -19,7 +19,7 @@ const AccountView = (props) => { ...@@ -19,7 +19,7 @@ const AccountView = (props) => {
return ( return (
<View> <View>
<HeaderDrawer /> <HeaderDrawer title={'Tài khoản'} />
<View style={styles.container}> <View style={styles.container}>
<TouchableOpacity <TouchableOpacity
onPress={() => navigate.navigate(PROFILE)} onPress={() => navigate.navigate(PROFILE)}
......
...@@ -2,7 +2,7 @@ import React from 'react'; ...@@ -2,7 +2,7 @@ import React from 'react';
import {View, Text, TouchableOpacity, Image, StyleSheet} from 'react-native'; import {View, Text, TouchableOpacity, Image, StyleSheet} from 'react-native';
import TextField from '../../../components/Input/TextField'; import TextField from '../../../components/Input/TextField';
import TextMulti from '../../../components/Input/TextMulti'; import TextMulti from '../../../components/Input/TextMulti';
import PickerImg from '../../../components/Picker/PickerImg'; import PickerImgUni from '../../../components/Picker/PickerImgUni';
import PickerDate from '../../../components/Picker/PickerDate'; import PickerDate from '../../../components/Picker/PickerDate';
import R from '../../../assets/R'; import R from '../../../assets/R';
import Button from '../../../components/Button'; import Button from '../../../components/Button';
...@@ -24,9 +24,9 @@ const BankInfor = (props) => { ...@@ -24,9 +24,9 @@ const BankInfor = (props) => {
justifyContent: 'space-between', justifyContent: 'space-between',
flexWrap: 'wrap', flexWrap: 'wrap',
}}> }}>
<PickerImg title={'Ảnh mặt trước CMND'} /> <PickerImgUni title={'Ảnh mặt trước CMND'} />
<PickerImg title={'Ảnh mặt sau CMND'} /> <PickerImgUni title={'Ảnh mặt sau CMND'} />
<PickerImg title={'Ảnh chữ ký'} /> <PickerImgUni title={'Ảnh chữ ký'} />
</View> </View>
<View style={styles.btnSend}> <View style={styles.btnSend}>
<Button title={'Xác minh'} /> <Button title={'Xác minh'} />
......
...@@ -48,6 +48,7 @@ const ConfirmEmail = (props) => { ...@@ -48,6 +48,7 @@ const ConfirmEmail = (props) => {
<View style={styles.containerCode}> <View style={styles.containerCode}>
<Text style={styles.txtTitle}>Vui lòng nhp email:</Text> <Text style={styles.txtTitle}>Vui lòng nhp email:</Text>
<TextInput <TextInput
placeholderTextColor={R.colors.placeHolder}
style={styles.txtInput} style={styles.txtInput}
placeholder="Nhập email" placeholder="Nhập email"
value={value} value={value}
......
...@@ -64,6 +64,7 @@ const NewPassword = (props) => { ...@@ -64,6 +64,7 @@ const NewPassword = (props) => {
<TextInput <TextInput
style={styles.txtInput} style={styles.txtInput}
placeholder="Nhập Email hoặc số điện thoại" placeholder="Nhập Email hoặc số điện thoại"
placeholderTextColor={R.colors.placeHolder}
value={password} value={password}
secureTextEntry={true} secureTextEntry={true}
onChangeText={(val) => setPassword(val)} onChangeText={(val) => setPassword(val)}
...@@ -76,6 +77,7 @@ const NewPassword = (props) => { ...@@ -76,6 +77,7 @@ const NewPassword = (props) => {
placeholder="Nhập Email hoặc số điện thoại" placeholder="Nhập Email hoặc số điện thoại"
value={cfPassword} value={cfPassword}
secureTextEntry={true} secureTextEntry={true}
placeholderTextColor={R.colors.placeHolder}
onChangeText={(val) => setcfPassword(val)} onChangeText={(val) => setcfPassword(val)}
/> />
</View> </View>
......
...@@ -92,6 +92,7 @@ const FeedbackView = (props) => { ...@@ -92,6 +92,7 @@ const FeedbackView = (props) => {
<View style={styles.footer}> <View style={styles.footer}>
<TextInput <TextInput
style={styles.txtInput} style={styles.txtInput}
placeholderTextColor={R.colors.placeHolder}
multiline={true} multiline={true}
placeholder={'Hãy chia sẻ cảm nhận về dịch vụ nhé'} placeholder={'Hãy chia sẻ cảm nhận về dịch vụ nhé'}
onChangeText={(val) => setTxtInput(val)} onChangeText={(val) => setTxtInput(val)}
......
...@@ -7,31 +7,33 @@ import Tab3 from './Tab3/Tab3'; ...@@ -7,31 +7,33 @@ import Tab3 from './Tab3/Tab3';
import {createMaterialTopTabNavigator} from '@react-navigation/material-top-tabs'; import {createMaterialTopTabNavigator} from '@react-navigation/material-top-tabs';
const Tab = createMaterialTopTabNavigator(); const Tab = createMaterialTopTabNavigator();
import HeaderDrawer from '../../components/Header/HeaderDrawer';
const NewFeed = (props) => { const NewFeed = (props) => {
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<StatusBar backgroundColor={'#BCD7F8'} /> <HeaderDrawer title={'Thông tin'} isWhite={true} />
<SafeAreaView style={{backgroundColor: '#BCD7F8'}} /> <View style={{flex: 1, backgroundColor: 'white'}}>
<Tab.Navigator <Tab.Navigator
initialRouteName="GeneralInfor" initialRouteName="GeneralInfor"
tabBarOptions={{ tabBarOptions={{
inactiveTintColor: '#929292', inactiveTintColor: '#929292',
activeTintColor: '#1473E6', activeTintColor: '#1473E6',
labelStyle: {fontSize: getFontXD(36), fontWeight: '700'}, labelStyle: {fontSize: getFontXD(36), fontWeight: '700'},
style: {backgroundColor: 'white'}, style: {backgroundColor: 'white'},
}}> }}>
<Tab.Screen <Tab.Screen
name="Tab1" name="Tab1"
component={Tab1} component={Tab1}
options={{tabBarLabel: 'Chiến lược'}} options={{tabBarLabel: 'Chiến lược'}}
/> />
<Tab.Screen <Tab.Screen
name="Tab2" name="Tab2"
component={Tab2} component={Tab2}
options={{tabBarLabel: 'Tin tức'}} options={{tabBarLabel: 'Tin tức'}}
/> />
</Tab.Navigator> </Tab.Navigator>
</View>
</View> </View>
); );
}; };
......
...@@ -20,7 +20,8 @@ import {HEIGHTXD} from '../../Config/Functions'; ...@@ -20,7 +20,8 @@ import {HEIGHTXD} from '../../Config/Functions';
import Modal from 'react-native-modal'; import Modal from 'react-native-modal';
import Drawer from './Drawer'; import Drawer from './Drawer';
const HeaderHome = (props) => { const HeaderDrawer = (props) => {
const {title, isWhite} = props;
const [isModalVisible, setModalVisible] = useState(false); const [isModalVisible, setModalVisible] = useState(false);
const toggleModal = () => { const toggleModal = () => {
...@@ -28,14 +29,16 @@ const HeaderHome = (props) => { ...@@ -28,14 +29,16 @@ const HeaderHome = (props) => {
}; };
return ( return (
<ImageBackground style={styles.img} source={R.images.bgHeader}> <ImageBackground
style={[styles.img, isWhite ? {backgroundColor: 'white'} : {}]}
source={R.images.bgHeader}>
<StatusBar backgroundColor="transparent" translucent={true} /> <StatusBar backgroundColor="transparent" translucent={true} />
<View style={styles.headerContainer}> <View style={styles.headerContainer}>
<TouchableOpacity onPress={toggleModal}> <TouchableOpacity onPress={toggleModal}>
<Image source={R.images.iconMenu} style={styles.imgIcon} /> <Image source={R.images.iconMenu} style={styles.imgIcon} />
</TouchableOpacity> </TouchableOpacity>
<Text style={styles.txtTitle}>Tài khon</Text> <Text style={styles.txtTitle}>{title}</Text>
<View /> <View />
</View> </View>
<Modal <Modal
...@@ -70,7 +73,7 @@ const mapStateToProps = (state) => { ...@@ -70,7 +73,7 @@ const mapStateToProps = (state) => {
}; };
}; };
export default connect(mapStateToProps, {})(HeaderHome); export default connect(mapStateToProps, {})(HeaderDrawer);
const styles = StyleSheet.create({ const styles = StyleSheet.create({
img: { img: {
......
...@@ -50,6 +50,7 @@ const HeaderSearch = (props) => { ...@@ -50,6 +50,7 @@ const HeaderSearch = (props) => {
{openSearch ? ( {openSearch ? (
<TextInput <TextInput
placeholderTextColor={R.colors.placeHolder}
style={styles.txtInput} style={styles.txtInput}
onChangeText={(val) => setTxtSearch(val)} onChangeText={(val) => setTxtSearch(val)}
value={txtSearch} value={txtSearch}
......
import React, {useState} from 'react';
import {
View,
Text,
Image,
StyleSheet,
TouchableOpacity,
TouchableWithoutFeedback,
} from 'react-native';
import R from '../../assets/R';
import {HEIGHTXD, WIDTHXD, getFontXD} from '../../Config/Functions';
import Icon from 'react-native-vector-icons/AntDesign';
import Modal from 'react-native-modal';
import Block from '../Block';
import ImagePicker from 'react-native-image-crop-picker';
const options = {
title: 'Select Avatar',
customButtons: [{name: 'fb', title: 'Choose Photo from Facebook'}],
storageOptions: {
skipBackup: true,
path: 'images',
},
};
const PickerImgUni = (props) => {
const {title, height, width} = props;
const [isModalVisible, setModalVisible] = useState(false);
const [urlImg, setUrlImg] = useState('');
// const [imgPicker, setImgPicker] = useState('');
const onchoosGalery = () => {
ImagePicker.openPicker({
mediaType: 'photo',
multiple: false,
}).then((image) => {
setModalVisible(false);
setUrlImg(image.path);
});
};
const onCapture = () => {
ImagePicker.openCamera({
mediaType: 'photo',
width: 300,
height: 400,
}).then((image) => {
setModalVisible(false);
setUrlImg(image.path);
});
};
return (
<TouchableOpacity
onPress={() => setModalVisible(true)}
style={{marginTop: 10, width: WIDTHXD(480)}}>
<Text style={styles.txt}>{title}</Text>
{urlImg ? (
<Image source={{uri: urlImg}} style={styles.container} />
) : (
<View style={styles.container}>
<Icon name={'plus'} size={40} color={'#DBDBDB'} />
</View>
)}
<Modal
isVisible={isModalVisible}
style={{margin: 0, justifyContent: 'flex-end'}}
onSwipeComplete={() => setModalVisible(false)}
swipeDirection={['up', 'left', 'right', 'down']}>
<TouchableWithoutFeedback onPress={() => setModalVisible(false)}>
<View style={{flex: 1}}></View>
</TouchableWithoutFeedback>
<View style={styles.containerSelect}>
<Text
style={{
textAlign: 'center',
fontSize: getFontXD(42),
fontWeight: 'bold',
color: '#1473E6',
}}>
Chn ngun ly nh
</Text>
<View style={styles.line} />
<Block row space={'around'} center>
<TouchableOpacity style={styles.selectionImg} onPress={onCapture}>
<Image style={styles.imgIcon} source={R.images.iconCamera} />
<Text style={styles.txtTitleBtn}>Chp nh</Text>
</TouchableOpacity>
<TouchableOpacity
style={styles.selectionImg}
onPress={onchoosGalery}>
<Image style={styles.imgIcon} source={R.images.iconImg} />
<Text style={styles.txtTitleBtn}>Thư vin nh</Text>
</TouchableOpacity>
</Block>
</View>
</Modal>
</TouchableOpacity>
);
};
const styles = StyleSheet.create({
container: {
width: WIDTHXD(350),
height: HEIGHTXD(280),
backgroundColor: R.colors.white,
borderRadius: 10,
justifyContent: 'center',
alignItems: 'center',
},
txt: {
fontSize: getFontXD(42),
color: R.colors.color777,
marginBottom: 5,
paddingLeft: 10,
},
selectionImg: {
padding: 10,
justifyContent: 'center',
alignItems: 'center',
},
containerSelect: {
height: HEIGHTXD(520),
backgroundColor: 'white',
paddingTop: 10,
borderTopLeftRadius: 20,
borderTopRightRadius: 20,
},
line: {
height: 1,
backgroundColor: '#929292',
width: '100%',
marginTop: 5,
},
imgIcon: {
width: 40,
height: 40,
},
txtTitleBtn: {
textAlign: 'center',
fontSize: getFontXD(42),
color: '#1473E6',
},
});
export default React.memo(PickerImgUni);
...@@ -42,7 +42,7 @@ function MyStack(props) { ...@@ -42,7 +42,7 @@ function MyStack(props) {
headerStatusBarHeight: 0, headerStatusBarHeight: 0,
}} }}
headerMode={'none'} headerMode={'none'}
initialRouteName={ScreenName.TABNAVIGATOR}> initialRouteName={ScreenName.AUTHEN}>
<Stack.Screen name={ScreenName.LOGINSCREEN} component={Login} /> <Stack.Screen name={ScreenName.LOGINSCREEN} component={Login} />
<Stack.Screen name={ScreenName.NOTIFICATION} component={Notification} /> <Stack.Screen name={ScreenName.NOTIFICATION} component={Notification} />
<Stack.Screen name={ScreenName.TABNAVIGATOR} component={TabNavigator} /> <Stack.Screen name={ScreenName.TABNAVIGATOR} component={TabNavigator} />
......
...@@ -8,7 +8,7 @@ import Home from '../Screens/Home/Home'; ...@@ -8,7 +8,7 @@ import Home from '../Screens/Home/Home';
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import R from '../assets/R'; import R from '../assets/R';
import PlussModal from './PlussModal'; import PlussModal from './PlussModal';
import Notification from '../Screens/Notification/Notification';
import Account from '../Screens/Account/Account'; import Account from '../Screens/Account/Account';
import Exchange from '../Screens/Exchange/Exchange'; import Exchange from '../Screens/Exchange/Exchange';
import NewFeed from '../Screens/NewFeed/NewFeed'; import NewFeed from '../Screens/NewFeed/NewFeed';
......
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