Browse Source

minor adjustments

master
analuizaff 3 years ago
parent
commit
95e73ae621
  1. 44
      src/app/components/FloatButton.js
  2. 2
      src/app/components/MenuItens.js
  3. 2
      src/app/navigation/SharingDataOptionsNavigator.js
  4. 4
      src/app/screens/AccountScreen.js
  5. 4
      src/app/screens/LoginScreen.js
  6. 2
      src/app/screens/MapFeedScreen.js

44
src/app/components/FloatButton.js

@ -18,6 +18,7 @@ import MenuItens from "./MenuItens";
const screenWidth = Dimensions.get("window").width;
const screenHeight = Dimensions.get("window").height;
console.log("-----screenHeight: " + screenHeight);
function FloatButton(props) {
@ -77,7 +78,6 @@ function FloatButton(props) {
});
const selectedItens = (item) => {
item.isSelected = !item.isSelected;
setChanged(!changed);
}
@ -103,18 +103,32 @@ function FloatButton(props) {
return (
<View>
<View style={styles.Menucontainer} >
<View style={{
flex: 1,
height: screenHeight * 0.70,//solução temporária, procurar soluções pro menu se ajustar melhor ao layout
paddingTop: (screenHeight > 600 ? 0 : screenHeight * 0.09)
flexDirection: "column",
height: screenHeight * 0.75,//solução temporária, procurar soluções pro menu se ajustar melhor ao layout
paddingTop: (screenHeight > 600 ? 0 : screenHeight * 0.10)
}}>
<View style={{
flex: 0.05,
marginTop: screenHeight * 0.09,
paddingBottom: 10,
zIndex:3,
justifyContent: "center"
}}>
<Text style={styles.menuLabel}>
Escolha o que deseja ver no mapa:
</Text>
</View>
<View
style={{ flex: 0.85, flexGrow: 0.85, marginTop: 2 }}>
<FlatList
data={layers.values}
keyExtractor={(datas) => datas.id.toString()}
renderItem={renderItem}
extraData={changed}
extraData={changed, open}
/>
</View>
<View style={styles.submit_btn}>
<TouchableOpacity onPress={() => applyLayers()}>
<View style={styles.button}>
@ -131,16 +145,14 @@ function FloatButton(props) {
return (
<View style={[styles.container]}>
<View style={{
width: (open ? screenWidth * 0.70 : 0),
flex: 1,
{open && (<View style={{
width: screenWidth * 0.70,
}}>
<Animated.View>
{DataMenu()}
</Animated.View>
</View>
<View style={{ margin: 35, alignSelf: "flex-end" }}>
</View>)}
<View style={{ flex: 0.10, margin: 12, alignSelf: "flex-end" }}>
<TouchableWithoutFeedback onPress={toggleMenu}>
<Animated.View style={[styles.floatButton, styles.menu]}>
<MaterialCommunityIcons
@ -187,6 +199,7 @@ const styles = StyleSheet.create({
bottom: 0,
width: "100%",
padding: 20,
flex: 0.10
},
button: {
backgroundColor: "#1976D2",
@ -212,7 +225,14 @@ const styles = StyleSheet.create({
color: colors.lightBlue,
fontSize: dimensions.text.tertiary,
fontWeight: "bold",
}
},
menuLabel: {
color: colors.lightBlue,
fontSize: 16,
fontWeight: "bold",
padding: 10,
backgroundColor: colors.white,
},
});
export default FloatButton;

2
src/app/components/MenuItens.js

@ -10,7 +10,7 @@ import { Ionicons } from '@expo/vector-icons';
function MenuItens({ item, onPress, icon }) {
return (
<TouchableOpacity onPress={onPress} style={[styles.item]}>
<View style={{ flexDirection: "row", flex: 1, marginTop: 12 }}>
<View style={{ flexDirection: "row", flex: 1, paddingTop: 20 }}>
<View style={{ flexDirection: "row", flex: 0.20 }}>
<Ionicons name="md-rainy" size={24} color={colors.lightBlue} />
</View>

2
src/app/navigation/SharingDataOptionsNavigator.js

@ -67,7 +67,7 @@ function SharingDataOptionsNavigator() {
name="FormMap"
component={MapFormScreen}
options={{
title: "Voltar",
title: "Selecione o ponto no mapa",
headerStyle: {
backgroundColor: "white",
},

4
src/app/screens/AccountScreen.js

@ -34,7 +34,7 @@ function AccountScreen(props) {
<Text>{user.name}</Text>
<Text>{user.email}</Text>
<TouchableOpacity onPress={()=> props.navigation.navigate("PluviometerRegister")}>
{/* <TouchableOpacity onPress={()=> props.navigation.navigate("PluviometerRegister")}>
<View style={{
flexDirection: "row",
justifyContent: "flex-start",
@ -55,7 +55,7 @@ function AccountScreen(props) {
</Text>
</View>
</View>
</TouchableOpacity>
</TouchableOpacity>*/}
<View style={{ paddingTop: 40 }}>
<Button
title="Logout"

4
src/app/screens/LoginScreen.js

@ -85,7 +85,7 @@ export default function LoginScreen(props) {
<SubmitButton title="entrar" backgroundColor={colors.primary} />
<TouchableNativeFeedback
{/* <TouchableNativeFeedback
onPress={() => {
props.navigation.navigate("Register");
}}
@ -94,7 +94,7 @@ export default function LoginScreen(props) {
<Text>Não tem uma conta? </Text>
<Text style={{ color: colors.lightBlue }}>Cadastre-se</Text>
</View>
</TouchableNativeFeedback>
</TouchableNativeFeedback>*/}
</Form>
</Screen>
);

2
src/app/screens/MapFeedScreen.js

@ -16,8 +16,6 @@ function MapFeedScreen(props) {
const datas = useContext(MapDataContext);
const location = context.currentCoordinates;
const focusChanged = attachFocusToQuery();
console.log("-----------latitude: "+ location.latitude);
console.log("-----------longitude: "+ location.longitude);
const default_location = {
latitude: -12.901799,

Loading…
Cancel
Save