Commit 127b4bc6 by Giang Tran

update moment

parent bc25cc28
...@@ -7,6 +7,10 @@ import { ...@@ -7,6 +7,10 @@ import {
Dimensions, Dimensions,
TouchableOpacity, TouchableOpacity,
Alert, Alert,
KeyboardAvoidingView,
TouchableWithoutFeedback,
Keyboard,
Platform,
} from 'react-native'; } from 'react-native';
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import R from '../../assets/R'; import R from '../../assets/R';
...@@ -90,8 +94,14 @@ const MethodPayDetail = (props) => { ...@@ -90,8 +94,14 @@ const MethodPayDetail = (props) => {
}; };
return ( return (
<KeyboardAvoidingView
behavior={Platform.Os === 'ios' ? 'padding' : 'height'}
style={{flex: 1}}
keyboardVerticalOffset={-50}>
<TouchableWithoutFeedback onPress={Keyboard.dismiss}>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Chi tiết phương thức'} /> <HeaderBack title={'Chi tiết phương thức'} />
<View style={{flex: 1}}>
<View style={styles.container}> <View style={styles.container}>
<BankInfor <BankInfor
linkImg={params.bank.logo} linkImg={params.bank.logo}
...@@ -116,6 +126,8 @@ const MethodPayDetail = (props) => { ...@@ -116,6 +126,8 @@ const MethodPayDetail = (props) => {
value={account_no} value={account_no}
/> />
</View> </View>
</View>
<View style={styles.footer}>
<TouchableOpacity onPress={onUpdate} style={styles.btnLeft}> <TouchableOpacity onPress={onUpdate} style={styles.btnLeft}>
<Text style={styles.txtAdd}>Cp nht</Text> <Text style={styles.txtAdd}>Cp nht</Text>
</TouchableOpacity> </TouchableOpacity>
...@@ -137,6 +149,9 @@ const MethodPayDetail = (props) => { ...@@ -137,6 +149,9 @@ const MethodPayDetail = (props) => {
<Text style={styles.txtAdd}>Xoá</Text> <Text style={styles.txtAdd}>Xoá</Text>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</View>
</TouchableWithoutFeedback>
</KeyboardAvoidingView>
); );
}; };
...@@ -145,6 +160,13 @@ const styles = StyleSheet.create({ ...@@ -145,6 +160,13 @@ const styles = StyleSheet.create({
paddingHorizontal: 20, paddingHorizontal: 20,
paddingTop: 10, paddingTop: 10,
}, },
footer: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
marginBottom: 10,
paddingHorizontal: 20,
},
btnLeft: { btnLeft: {
width: 150, width: 150,
height: 40, height: 40,
...@@ -152,9 +174,6 @@ const styles = StyleSheet.create({ ...@@ -152,9 +174,6 @@ const styles = StyleSheet.create({
alignItems: 'center', alignItems: 'center',
backgroundColor: R.colors.main, backgroundColor: R.colors.main,
borderRadius: 5, borderRadius: 5,
position: 'absolute',
bottom: 30,
left: 20,
}, },
btnRight: { btnRight: {
width: 150, width: 150,
...@@ -163,9 +182,6 @@ const styles = StyleSheet.create({ ...@@ -163,9 +182,6 @@ const styles = StyleSheet.create({
alignItems: 'center', alignItems: 'center',
backgroundColor: R.colors.main, backgroundColor: R.colors.main,
borderRadius: 5, borderRadius: 5,
position: 'absolute',
bottom: 30,
right: 20,
}, },
txtAdd: { txtAdd: {
color: R.colors.white, color: R.colors.white,
......
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