Commit 021bd1f6 authored by Trisno's avatar Trisno

build 130 dan fixing bug tambah alamat, keyboard nutupin textinput

parent de43f201
{
"expo": {
"extra" : {
"buildNumber" : "128",
"buildNumber" : "130",
"remarks": ""
},
......
......@@ -219,107 +219,113 @@ class AddreesDetail extends React.Component {
render() {
return (
<KeyboardAvoidingView behavior={Platform.OS == "ios" ? 40 : 0} style={styles.container}>
<ScrollView>
<View style={styles.content}>
<View style={{ height: 45, borderRadius: 10, borderColor: '#ccb46c', borderWidth: 1, flexDirection: 'row', marginTop: 15, marginLeft: 10, marginRight: 10 }}>
<View style={{ flex: 1, top: 5 }}>
<MaterialCommunityIcons name="map-marker" size={32} color="#ccb46c" />
</View>
<View style={{ flex: 6 }}>
<TextInput style={{ height: 45 }} placeholder={i18n.t('findAddress')}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({ caretHidden: false })}
onChangeText={(address) => this.setState({ address })}>
</TextInput>
</View>
<View style={{ flex: 1, margin: 5 }}>
<TouchableOpacity onPress={() => this._searchLocation()}>
<Ionicons name="ios-search" size={32} color="#ccb46c" />
</TouchableOpacity>
<KeyboardAvoidingView
behavior={Platform.OS == 'ios' ? "padding" : "height"}
style={{ flex: 1 }}>
<View style={styles.container}>
<ScrollView>
<View style={styles.content}>
<View style={{ height: 45, borderRadius: 10, borderColor: '#ccb46c', borderWidth: 1, flexDirection: 'row', marginTop: 15, marginLeft: 10, marginRight: 10 }}>
<View style={{ flex: 1, top: 5 }}>
<MaterialCommunityIcons name="map-marker" size={32} color="#ccb46c" />
</View>
<View style={{ flex: 6 }}>
<TextInput style={{ height: 45 }} placeholder={i18n.t('findAddress')}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({ caretHidden: false })}
onChangeText={(address) => this.setState({ address })}>
</TextInput>
</View>
<View style={{ flex: 1, margin: 5 }}>
<TouchableOpacity onPress={() => this._searchLocation()}>
<Ionicons name="ios-search" size={32} color="#ccb46c" />
</TouchableOpacity>
</View>
</View>
</View>
<View style={styles.cont_google_map}>
<MapView
region={{
latitude: this.state.latitude,
longitude: this.state.longitude,
latitudeDelta: 0.1,
longitudeDelta: 0.1,
}}
zoomEnabled={true}
showsMyLocationButton={true}
loadingEnabled={true}
showsUserLocation={true}
showsScale={true}
provider={PROVIDER_GOOGLE}
style={styles.cont_google_map}>
<MapView.Marker
coordinate={{
<View style={styles.cont_google_map}>
<MapView
region={{
latitude: this.state.latitude,
longitude: this.state.longitude
longitude: this.state.longitude,
latitudeDelta: 0.1,
longitudeDelta: 0.1,
}}
title={i18n.t('yourLocation')}
description={this.state.street}
/>
</MapView>
<View style={{ position: 'absolute', top: '50%', alignSelf: 'flex-end' }}>
<View style={{ margin: 15 }}>
<TouchableOpacity style={{ height: 30, width: 30, backgroundColor: '#e6e6e6' }} onPress={() => this._getLocationAsync()}>
{/* <Image source={require('../assets/icon/gps.png')} style={{ height: 30, width: 30 }} /> */}
</TouchableOpacity>
zoomEnabled={true}
showsMyLocationButton={true}
loadingEnabled={true}
showsUserLocation={true}
showsScale={true}
provider={PROVIDER_GOOGLE}
style={styles.cont_google_map}>
<MapView.Marker
coordinate={{
latitude: this.state.latitude,
longitude: this.state.longitude
}}
title={i18n.t('yourLocation')}
description={this.state.street}
/>
</MapView>
<View style={{ position: 'absolute', top: '50%', alignSelf: 'flex-end' }}>
<View style={{ margin: 15 }}>
<TouchableOpacity style={{ height: 30, width: 30, backgroundColor: '#e6e6e6' }} onPress={() => this._getLocationAsync()}>
{/* <Image source={require('../assets/icon/gps.png')} style={{ height: 30, width: 30 }} /> */}
</TouchableOpacity>
</View>
</View>
</View>
</View>
<View style={styles.name_addrees_input}>
<View style={{ flexDirection: 'row', top: 10, justifyContent: 'center' }}>
<View style={{ flex: 1, justifyContent: 'center', flexDirection: 'row' }}>
<MaterialCommunityIcons name="map-marker" size={32} color="#ccb46c" />
<View style={styles.name_addrees_input}>
<View style={{ flexDirection: 'row', top: 10, justifyContent: 'center' }}>
<View style={{ flex: 1, justifyContent: 'center', flexDirection: 'row' }}>
<MaterialCommunityIcons name="map-marker" size={32} color="#ccb46c" />
</View>
{this.state.indicator == true ? (
<ActivityIndicator size="large" color="#c9af6d" />
) : (
<View style={{ flex: 3, justifyContent: 'center' }}>
<Text style={{ fontFamily: 'Gotham-Light', textAlign: 'center' }}>{this.state.street}</Text>
<Text style={{ fontFamily: 'Gotham-Light', textAlign: 'center' }}>{this.state.city} </Text>
<Text style={{ fontFamily: 'Gotham-Light', textAlign: 'center' }}>{this.state.region}</Text>
<Text style={{ fontFamily: 'Gotham-Light', textAlign: 'center' }}>{this.state.postalCode}</Text>
</View>
)}
<View style={{ flex: 1 }}>
</View>
</View>
{this.state.indicator == true ? (
<ActivityIndicator size="large" color="#c9af6d" />
) : (
<View style={{ flex: 3, justifyContent: 'center' }}>
<Text style={{ fontFamily: 'Gotham-Light', textAlign: 'center' }}>{this.state.street}</Text>
<Text style={{ fontFamily: 'Gotham-Light', textAlign: 'center' }}>{this.state.city} </Text>
<Text style={{ fontFamily: 'Gotham-Light', textAlign: 'center' }}>{this.state.region}</Text>
<Text style={{ fontFamily: 'Gotham-Light', textAlign: 'center' }}>{this.state.postalCode}</Text>
</View>
)}
<View style={{ flex: 1 }}>
<View style={styles.field_name_addrees}>
<Text style={{ fontFamily: 'Gotham-Black', color: "#ccb46c", textAlign: 'center', fontSize: 18 }}>{i18n.t('label')}</Text>
<TextInput style={{ color: 'grey', fontFamily: 'Gotham-Black', height: 40, borderWidth: 1, padding: 5, flex: 1, margin: 10, borderRadius: 10, borderColor: 'grey', textAlign: 'center' }}
onChangeText={(name) => this.setState({ name })}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({ caretHidden: false })} />
</View>
</View>
<View style={styles.field_name_addrees}>
<Text style={{ fontFamily: 'Gotham-Black', color: "#ccb46c", textAlign: 'center', fontSize: 18 }}>{i18n.t('label')}</Text>
<TextInput style={{ color: 'grey', fontFamily: 'Gotham-Black', height: 40, borderWidth: 1, padding: 5, flex: 1, margin: 10, borderRadius: 10, borderColor: 'grey', textAlign: 'center' }}
onChangeText={(name) => this.setState({ name })}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({ caretHidden: false })} />
</View>
<View style={styles.field_detail_addrees}>
<Text style={{ fontFamily: 'Gotham-Black', color: "#ccb46c", textAlign: 'center', fontSize: 18 }}>{i18n.t('detail')}</Text>
<TextInput
style={{ color: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', height: 70, borderWidth: 1, padding: 5, flex: 1, margin: 10, borderRadius: 10, borderColor: 'grey' }}
onChangeText={(description) => this.setState({ description })}
numberOfLines={10}
multiline={true}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({ caretHidden: false })} />
</View>
<View style={{ margin: 50, justifyContent: 'center' }}>
<TouchableOpacity onPress={() => this.saveAddress()}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368', justifyContent: 'center' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center' }}>{i18n.t('addaddress')}</Text>
</View>
</TouchableOpacity>
<View style={styles.field_detail_addrees}>
<Text style={{ fontFamily: 'Gotham-Black', color: "#ccb46c", textAlign: 'center', fontSize: 18 }}>{i18n.t('detail')}</Text>
<TextInput
style={{ color: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', height: 70, borderWidth: 1, padding: 5, flex: 1, margin: 10, borderRadius: 10, borderColor: 'grey' }}
onChangeText={(description) => this.setState({ description })}
numberOfLines={10}
multiline={true}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({ caretHidden: false })} />
</View>
<View style={{ margin: 50, justifyContent: 'center' }}>
<TouchableOpacity onPress={() => this.saveAddress()}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368', justifyContent: 'center' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center' }}>{i18n.t('addaddress')}</Text>
</View>
</TouchableOpacity>
</View>
<View style={{ height: 20 }}></View>
</View>
<View style={{ height: 20 }}></View>
</View>
</View>
</ScrollView>
</ScrollView>
</View>
</KeyboardAvoidingView>
)
}
......
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