Commit 6bfd7025 by Giang Tran

screen payment

parent 34afef31
...@@ -6,6 +6,7 @@ import rootReducer from './src/Reducers/index'; ...@@ -6,6 +6,7 @@ import rootReducer from './src/Reducers/index';
import RootView from './src/RootView'; import RootView from './src/RootView';
import createSagaMiddleware from 'redux-saga'; import createSagaMiddleware from 'redux-saga';
import rootSaga from './src/Saga/rootSaga'; import rootSaga from './src/Saga/rootSaga';
import {SafeAreaProvider} from 'react-native-safe-area-context';
const sagaMiddleware = createSagaMiddleware(); const sagaMiddleware = createSagaMiddleware();
...@@ -13,9 +14,11 @@ let store = createStore(rootReducer, applyMiddleware(sagaMiddleware)); ...@@ -13,9 +14,11 @@ let store = createStore(rootReducer, applyMiddleware(sagaMiddleware));
sagaMiddleware.run(rootSaga); sagaMiddleware.run(rootSaga);
const App = () => { const App = () => {
return ( return (
<SafeAreaProvider>
<Provider store={store}> <Provider store={store}>
<RootView /> <RootView />
</Provider> </Provider>
</SafeAreaProvider>
); );
}; };
......
...@@ -11,8 +11,9 @@ ...@@ -11,8 +11,9 @@
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false" android:allowBackup="false"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true" android:usesCleartextTraffic="true"
android:theme="@style/AppTheme"> >
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:label="@string/app_name" android:label="@string/app_name"
......
import React from 'react'; import React from 'react';
import {View, Text} from 'react-native'; import {
View,
Text,
KeyboardAvoidingView,
ScrollView,
Platform,
} from 'react-native';
import HeaderBack from '../../components/Header/HeaderBack'; import HeaderBack from '../../components/Header/HeaderBack';
import BankInfor from './Tab/BankInfor'; import BankInfor from './Tab/BankInfor';
import GeneralInfor from './Tab/GeneralInfor'; import GeneralInfor from './Tab/GeneralInfor';
...@@ -10,6 +16,11 @@ const Tab = createMaterialTopTabNavigator(); ...@@ -10,6 +16,11 @@ const Tab = createMaterialTopTabNavigator();
const AccountVerificationView = (props) => { const AccountVerificationView = (props) => {
return ( return (
<KeyboardAvoidingView
behavior={Platform.Os === 'ios' ? 'padding' : 'height'}
style={{flex: 1}}
keyboardVerticalOffset={-50}>
<ScrollView showsVerticalScrollIndicator={false}>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack isWhite={true} title={'Xác minh tài khoản'} /> <HeaderBack isWhite={true} title={'Xác minh tài khoản'} />
<Tab.Navigator <Tab.Navigator
...@@ -38,6 +49,8 @@ const AccountVerificationView = (props) => { ...@@ -38,6 +49,8 @@ const AccountVerificationView = (props) => {
/> />
</Tab.Navigator> </Tab.Navigator>
</View> </View>
</ScrollView>
</KeyboardAvoidingView>
); );
}; };
......
...@@ -28,6 +28,7 @@ const GeneralInfor = (props) => { ...@@ -28,6 +28,7 @@ const GeneralInfor = (props) => {
/> />
<TextMulti title={'Địa chỉ'} /> <TextMulti title={'Địa chỉ'} />
<View style={{height: 100}} />
</View> </View>
); );
}; };
......
import React from 'react'; import React from 'react';
import {View, Text} from 'react-native'; import {
View,
Text,
KeyboardAvoidingView,
Platform,
SafeAreaView,
StatusBar,
} from 'react-native';
import HeaderAuthen from '../../components/Header/HeaderAuthen'; import HeaderAuthen from '../../components/Header/HeaderAuthen';
import {createMaterialTopTabNavigator} from '@react-navigation/material-top-tabs'; import {createMaterialTopTabNavigator} from '@react-navigation/material-top-tabs';
import {getFontXD} from '../../Config/Functions'; import {getFontXD} from '../../Config/Functions';
import Login from './Login'; import Login from './Login';
import Registor from './Registor'; import Registor from './Registor';
import {ScrollView} from 'react-native-gesture-handler';
const Tab = createMaterialTopTabNavigator(); const Tab = createMaterialTopTabNavigator();
const Authen = (props) => { const Authen = (props) => {
return ( return (
<KeyboardAvoidingView
behavior={Platform.Os === 'ios' ? 'padding' : 'height'}
style={{flex: 1, backgroundColor: 'white'}}
keyboardVerticalOffset={-50}>
<ScrollView showsVerticalScrollIndicator={false}>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderAuthen /> <HeaderAuthen />
<View style={{flex: 1, backgroundColor: 'white'}}> <View style={{flex: 1, backgroundColor: 'white'}}>
...@@ -37,6 +49,8 @@ const Authen = (props) => { ...@@ -37,6 +49,8 @@ const Authen = (props) => {
</Tab.Navigator> </Tab.Navigator>
</View> </View>
</View> </View>
</ScrollView>
</KeyboardAvoidingView>
); );
}; };
......
import React from 'react'; import React from 'react';
import {View, Text, StyleSheet, Image, TouchableOpacity} from 'react-native'; import {
View,
Text,
StyleSheet,
Image,
TouchableOpacity,
KeyboardAvoidingView,
Platform,
} from 'react-native';
import InputIcon from '../../components/Input/InputIcon'; import InputIcon from '../../components/Input/InputIcon';
import {getFontXD, HEIGHTXD, WIDTHXD} from '../../Config/Functions'; import {getFontXD, HEIGHTXD, WIDTHXD} from '../../Config/Functions';
import R from '../../assets/R'; import R from '../../assets/R';
import {useNavigation} from '@react-navigation/native'; import {useNavigation} from '@react-navigation/native';
import {TABNAVIGATOR, FORGOTPASSWORD} from '../../routers/ScreenNames'; import {TABNAVIGATOR, FORGOTPASSWORD} from '../../routers/ScreenNames';
const Login = (props) => { const Login = (props) => {
const {navigation} = props; const {navigation} = props;
...@@ -61,6 +70,7 @@ const Login = (props) => { ...@@ -61,6 +70,7 @@ const Login = (props) => {
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</View> </View>
<View style={{height: 100}} />
</View> </View>
); );
}; };
......
import React from 'react';
import {View, Text, StyleSheet, TouchableOpacity, Image} from 'react-native';
import {getFontXD, HEIGHTXD, WIDTHXD, toPriceVnd} from '../../Config/Functions';
import R from '../../assets/R';
import Block from '../../components/Block';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
const Item = (props) => {
const {item} = props;
return (
<TouchableOpacity onPress={() => console.log('HEllo')}>
<View style={styles.container}>
<Block flex={1} row center padding={[10, 10]}>
<Image source={item.image} style={styles.imgIcon} />
<Block padding={[0, 10]}>
<Text style={styles.txtBig}>{item.title}</Text>
<Block space={'between'} margin={[10, 0, 0, 0]} row flex={1}>
<Block>
<Text style={styles.txtLeft}>Tien nap toi thieu</Text>
<Text style={styles.txtLeft}>Hoa hong</Text>
<Text style={styles.txtLeft}>Thoi gian</Text>
</Block>
<Block>
<Text style={styles.txtRight}>{item.minPay} USD</Text>
<Text style={styles.txtRight}>{item.rose} USD</Text>
<Text style={styles.txtRight}>{item.time}</Text>
</Block>
</Block>
</Block>
</Block>
</View>
</TouchableOpacity>
);
};
export default React.memo(Item);
const styles = StyleSheet.create({
container: {
marginTop: 10,
height: HEIGHTXD(320),
shadowColor: '#000',
shadowOffset: {
width: 0,
height: 2,
},
shadowOpacity: 0.25,
shadowRadius: 3.84,
elevation: 5,
marginHorizontal: 10,
backgroundColor: R.colors.white,
marginBottom: 10,
borderRadius: HEIGHTXD(30),
},
wrapLeft: {
width: WIDTHXD(16),
borderTopLeftRadius: HEIGHTXD(30),
borderBottomStartRadius: HEIGHTXD(30),
},
wrapDate: {
justifyContent: 'center',
paddingHorizontal: 10,
},
txtTitle: {
fontSize: getFontXD(42),
color: R.colors.black,
fontWeight: 'bold',
},
txt: {
fontSize: getFontXD(39),
color: '#929292',
fontStyle: 'italic',
},
rowBet: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
},
txtBlack: {
fontSize: getFontXD(42),
color: 'black',
},
imgIcon: {
width: WIDTHXD(220),
height: HEIGHTXD(220),
resizeMode: 'contain',
},
txtLeft: {
fontSize: getFontXD(36),
color: '#929292',
marginBottom: 5,
},
txtBig: {
fontSize: getFontXD(42),
color: '#00359C',
},
txtRight: {
fontSize: getFontXD(36),
fontWeight: 'bold',
marginBottom: 5,
},
});
import React from 'react'; import React from 'react';
import {View, Text} from 'react-native'; import {View, Text, StyleSheet, FlatList} from 'react-native';
import R from '../../assets/R';
import HeaderBack from '../../components/Header/HeaderBack';
import Item from './Item';
const data = [
{
image: R.images.iconNganLuong,
title: 'Ngân lượng',
rose: 0,
time: 'Tức thời',
minPay: 5,
id: '1',
},
{
image: R.images.iconVisa,
title: 'Visa bank',
rose: 0,
time: 'Tức thời',
minPay: 1,
id: '2',
},
{
image: R.images.iconInternet,
title: 'Internet banking',
rose: 0,
time: 'Tức thời',
minPay: 5,
id: '3',
},
{
image: R.images.iconBitcoin,
title: 'Bitcoin',
rose: 0,
time: 'Tức thời',
minPay: 2,
id: '4',
},
{
image: R.images.iconSticpay,
title: 'Sticpay',
rose: 0,
time: 'Tức thời',
minPay: 1,
id: '5',
},
{
image: R.images.iconTether,
title: 'Tether',
rose: 0,
time: 'Tức thời',
minPay: 10,
id: '6',
},
];
const MethodPayView = (props) => { const MethodPayView = (props) => {
return ( return (
<View> <View style={{flex: 1}}>
<Text>MethodPayView screen</Text> <HeaderBack title={'Cài đặt phương thức thanh toán'} />
<View style={{flex: 1}}>
<FlatList
keyExtractor={(item) => item.id}
showsVerticalScrollIndicator={false}
data={data}
renderItem={({item}) => <Item item={item} />}
/>
</View>
</View> </View>
); );
}; };
const styles = StyleSheet.create({});
export default MethodPayView; export default MethodPayView;
...@@ -42,6 +42,13 @@ const images = { ...@@ -42,6 +42,13 @@ const images = {
iconEmail: require('./images/iconEmail1.png'), iconEmail: require('./images/iconEmail1.png'),
iconUser3: require('./images/iconUser3.png'), iconUser3: require('./images/iconUser3.png'),
iconRight1: require('./images/iconRight1.png'), iconRight1: require('./images/iconRight1.png'),
iconNganLuong: require('./images/iconNganLuong.png'),
iconVisa: require('./images/iconVisa.png'),
iconInternet: require('./images/iconInternet.png'),
iconBitcoin: require('./images/iconBitcoin.png'),
iconSticpay: require('./images/iconSticpay.png'),
iconTether: require('./images/iconTether.png'),
}; };
export default images; export default images;
...@@ -41,9 +41,8 @@ export default connect(mapStateToProps, {})(HeaderAuthen); ...@@ -41,9 +41,8 @@ export default connect(mapStateToProps, {})(HeaderAuthen);
const styles = StyleSheet.create({ const styles = StyleSheet.create({
img: { img: {
height: Platform.OS == 'ios' ? HEIGHTXD(750) : HEIGHTXD(920), height: 260,
width: '100%', width: '100%',
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
backgroundColor: 'white', backgroundColor: 'white',
......
...@@ -30,4 +30,4 @@ const InputComponent = (props) => { ...@@ -30,4 +30,4 @@ const InputComponent = (props) => {
); );
}; };
export default InputComponent; export default React.memo(InputComponent);
...@@ -31,7 +31,12 @@ const Stack = createStackNavigator(); ...@@ -31,7 +31,12 @@ const Stack = createStackNavigator();
function MyStack(props) { function MyStack(props) {
return ( return (
<Stack.Navigator headerMode={'none'} initialRouteName={ScreenName.AUTHEN}> <Stack.Navigator
screenOptions={{
headerStatusBarHeight: 0,
}}
headerMode={'none'}
initialRouteName={ScreenName.AUTHEN}>
<Stack.Screen name={ScreenName.LOGINSCREEN} component={Login} /> <Stack.Screen name={ScreenName.LOGINSCREEN} component={Login} />
<Stack.Screen name={ScreenName.TABNAVIGATOR} component={TabNavigator} /> <Stack.Screen name={ScreenName.TABNAVIGATOR} component={TabNavigator} />
<Stack.Screen <Stack.Screen
......
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