Fix layout issues on Android

This commit is contained in:
John Lyon-Smith
2018-04-08 10:17:15 -07:00
parent dd2adf807f
commit 5634acb967
9 changed files with 119 additions and 85 deletions

View File

@@ -60,7 +60,7 @@ export class WorkItem extends React.Component {
},
location: {
isValid: true,
isDisabled: true,
isReadOnly: true,
},
details: {
isValid: (r, v) => v !== "",
@@ -210,29 +210,37 @@ export class WorkItem extends React.Component {
/>
</View>
<View style={styles.panel}>
<MapView
style={{
flexDirection: "column",
justifyContent: "center",
width: "100%",
height: 400,
marginBottom: 10,
}}
zoomControlEnabled
initialRegion={{
latitude: 43.653908,
longitude: -79.384293,
latitudeDelta: 0.0922,
longitudeDelta: 0.0421,
}}
onRegionChange={this.handleRegionChange}>
<View style={{ flexDirection: "column", justifyContent: "center" }}>
<MapView
style={{
flexDirection: "column",
justifyContent: "center",
width: "100%",
height: 400,
marginBottom: 10,
}}
showsBuildings={false}
showsTraffic={false}
showsIndoors={false}
zoomControlEnabled
initialRegion={{
latitude: 43.653908,
longitude: -79.384293,
latitudeDelta: 0.0922,
longitudeDelta: 0.0421,
}}
onRegionChange={this.handleRegionChange}
/>
<Icon
name="target"
size={24}
style={{ alignSelf: "center" }}
pointerEvents={false}
style={{
position: "absolute",
alignSelf: "center",
}}
/>
</MapView>
</View>
<BoundInput
ref={(ref) => (this.latLngInput = ref)}
binder={binder}
@@ -258,7 +266,7 @@ export class WorkItem extends React.Component {
detail={messageModal ? messageModal.detail : ""}
onDismiss={messageModal && this.handleMessageDismiss}
/>
<KeyboardSpacer />
{Platform.OS === "ios" && <KeyboardSpacer />}
</View>
)
}