Commit dd72260d authored by Farhani's avatar Farhani

Change app icon

parent 2db00341
......@@ -12,8 +12,109 @@ const plusbutton = require('../../images/plusbutton.png');
// const editbutton = require('../../images/editbutton.png');
// const deletebutton = require ('../../images/deletebutton.png');
const AddItemScreen = ({navigation}) => {
const requestCameraPermission = async () => {
try {
const granted = await PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.CAMERA,
{
title: "Cool Photo App Camera Permission",
message:
"Cool Photo App needs access to your camera " +
"so you can take awesome pictures.",
buttonNeutral: "Ask Me Later",
buttonNegative: "Cancel",
buttonPositive: "OK"
}
);
if (granted === PermissionsAndroid.RESULTS.GRANTED) {
console.log("You can use the camera");
} else {
console.log("Camera permission denied");
}
} catch (err) {
console.warn(err);
}
};
const requestExternalWritePermission = async () => {
if (Platform.OS === 'android') {
try {
const granted = await PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE,
{
title: 'External Storage Write Permission',
message: 'App needs write permission',
},
);
// If WRITE_EXTERNAL_STORAGE Permission is granted
return granted === PermissionsAndroid.RESULTS.GRANTED;
} catch (err) {
console.warn(err);
alert('Write permission err', err);
}
return false;
} else return true;
};
const openCamera = () => {
requestCameraPermission()
const options={
storageOption : {
path:'images',
mediaType:'photo',
},
includeBase64: true,
};
launchCamera(options, response => {
console.log('Response = ', response);
if (response.didCancel) {
console.log('User cancelled image picker');
} else if (response.error) {
console.log('ImagePicker Error: ', response.error);
} else if (response.customButton) {
console.log('User tapped custom button: ', response.customButton);
alert(response.customButton);
} else {
console.log('Response else = ', response);
const source = response.assets[0].uri
console.log(source)
// setImage(source);
// setImageUri(source);
// setAddImageVisible(false);
}
});
};
const openGallery = () => {
requestExternalWritePermission()
const options={
storageOption : {
path:'images',
mediaType:'photo',
},
includeBase64: true,
};
launchImageLibrary(options, response => {
console.log('Response = ', response);
if (response.didCancel) {
console.log('User cancelled image picker');
} else if (response.error) {
console.log('ImagePicker Error: ', response.error);
} else if (response.customButton) {
console.log('User tapped custom button: ', response.customButton);
alert(response.customButton);
} else {
const source = response.assets[0].uri
console.log(source)
// setImage(source);
// setImageUri(source);
// setAddImageVisible(false);
}
});
};
const [addImageModalVisible, setAddImageModalVisible] = useState(false);
const AddImageModal = () => {
if(addImageModalVisible){
......@@ -30,7 +131,7 @@ const AddItemScreen = ({navigation}) => {
style={{
height:'100%',
width:'100%',
backgroundColor:'rgba(192,192,192,0.8)',
backgroundColor:'rgba(0,0,0,.5)',
justifyContent:'center',
alignItems:'center'
}}>
......@@ -295,7 +396,7 @@ const styles = StyleSheet.create({
marginTop:50,
},
textItem:{
fontFamily:'Poppins-SemiBold',
fontFamily:'Poppins-Regular',
fontSize:20,
color:'black',
marginHorizontal:20,
......
import React, { useEffect, useState } from 'react';
import { View, Text, TouchableOpacity, SafeAreaView, StyleSheet, Image, FlatList, Modal, Alert, TextInput, PermissionsAndroid, Platform, button} from 'react-native';
import { openDatabase } from 'react-native-sqlite-storage';
import {launchCamera, launchImageLibrary} from 'react-native-image-picker';
import InputSpinner from 'react-native-input-spinner';
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
......@@ -17,6 +16,7 @@ const cat = require('../../images/cat.jpg');
const ItemScreen = ({navigation}) => {
const [addItemVisible, setAddItemVisible] = useState(false);
const [manageItemModalVisible, setManageItemModalVisible] = useState(false);
const addItemModal = () => {
if(addItemVisible){
return(
......@@ -31,7 +31,7 @@ const ItemScreen = ({navigation}) => {
style={{
height:'100%',
width:'100%',
backgroundColor:'rgba(192,192,192,0.8)',
backgroundColor:'rgba(0,0,0,.5)',
justifyContent:'center',
alignItems:'center'
}}>
......@@ -46,8 +46,9 @@ const ItemScreen = ({navigation}) => {
onPress ={()=> setAddItemVisible(false)}
/>
<View
style={{backgroundColor:'white',
width:"90%",
style={{
backgroundColor:'white',
width:"80%",
height:300,
justifyContent:'flex-start',
// position:'absolute',
......@@ -62,7 +63,186 @@ const ItemScreen = ({navigation}) => {
alignSelf:'center',
marginTop:20
}}>
Photo
Add item
</Text>
<View style={{
backgroundColor:'#ededed',
borderRadius:9,
width:275,
height:60,
marginHorizontal:19,
marginTop:15,
justifyContent:'center',
alignContent:'flex-start',
alignItems:'flex-start',
alignSelf:'center',
}}>
<TextInput style={{
fontSize:20,
marginHorizontal:5,
fontFamily:'Poppins-SemiBold',
alignItems:'center',
textAlignVertical:'top',
width:'100%'
}}
placeholder="Add item"
placeholderTextColor="grey"
// onChangeText={(name) => setName(name)}
/>
</View>
<View
style={{
width:275,
height:60,
backgroundColor:'#ededed',
justifyContent:'center',
alignContent:'center',
alignItems:'center',
alignSelf:'flex-start',
borderRadius:9,
// elevation:7,
marginTop:20,
marginHorizontal:19,
}}>
<InputSpinner
// value={quantity}
min={0}
max={100}
step={1}
// onChange={(quantity) => setQuantity(quantity)}
onLimitReached={(isMax, msg) => console.log(isMax,msg)}
rounded
// showBorder skin='default'
textColor='black'
fontSize={20}
fontFamily="Poppins-Regular"
colorMin='white'
colorMax='white'
buttonTextColor='dodgerblue'
colorPress="dodgerblue"
color='white'
width={200}
height={50}
/>
</View>
<View
style={{
flexDirection:'row',
margin:25,
marginTop:30,
justifyContent:'space-between',
marginBottom:40,
}}>
<TouchableOpacity
style={{
marginHorizontal:5
}}
onPress={() => {setConfirmEditModalVisible(true)}}
>
<View
style={{
backgroundColor:'#c60000',
borderRadius:7,
width:100,
height:50,
alignItems:'center',
alignContent:'center',
justifyContent:'center'
}}>
<Text
style={{
fontSize:20,
color:'white',
alignItems:'center',
alignContent:'center',
justifyContent:'center',
fontFamily:'Poppins-Medium'
}}>
CANCEL
</Text>
</View>
</TouchableOpacity>
<TouchableOpacity
style={{
marginHorizontal:5
}}
// onPress={() => navigation.navigate('ItemScreen')}
// onPress={updateList}
>
<View
style={{
backgroundColor:'#0077eb',
borderRadius:7,
width:100,
height:50,
alignItems:'center',
alignContent:'center',
justifyContent:'center',
}}>
<Text
style={{
fontSize:20,
color:'white',
fontFamily:'Poppins-Medium'
}}>
ADD
</Text>
</View>
</TouchableOpacity>
</View>
</View>
</View>
</Modal>
)
}
}
const ManageItemModal = () => {
if(manageItemModalVisible){
return(
<Modal
animationType="none"
transparent={true}
visible={manageItemModalVisible}
onRequestClose={()=> {
// Alert.alert("Modal has been closed.");
setManageItemModalVisible(!manageItemModalVisible);
}}>
<View
style={{
height:'100%',
width:'100%',
backgroundColor:'rgba(0,0,0,.5)',
justifyContent:'center',
alignItems:'center'
}}>
<TouchableOpacity
style={{
height:'100%',
width:'100%',
position:'absolute',
top:0,
flex:1
}}
onPress={() => setManageItemModalVisible(false)}
/>
<View
style={{backgroundColor:'white',
width:"100%",
height:200,
justifyContent:'flex-start',
position:'absolute',
bottom:0,
borderRadius:15,}}>
<Text
style={{
fontFamily:'Poppins-SemiBold',
fontSize:20,
color:'black',
alignSelf:'center',
marginTop:20
}}>
Manage item
</Text>
<TouchableOpacity
style={{
......@@ -70,10 +250,10 @@ const ItemScreen = ({navigation}) => {
flexDirection:'row',
marginTop:20,
}}
onPress={()=> setEditModalVisible(true)}
onPress={() => navigation.navigate('AddItemScreen')}
>
<MaterialCommunityIcons
name="camera"
name="pencil"
size={30}
color="#838383"
/>
......@@ -96,7 +276,7 @@ const ItemScreen = ({navigation}) => {
flexDirection:'row',
marginTop:20,
}}
onPress={()=>setDeleteModalVisible(true)}
// onPress={()=>setDeleteModalVisible(true)}
>
<MaterialCommunityIcons
name="delete"
......@@ -178,7 +358,8 @@ const ItemScreen = ({navigation}) => {
alignItems:'center',
alignContent:'center',
right:2,
}}>
}}
onPress={() => setManageItemModalVisible(true)}>
<MaterialIcons
name="more-vert"
color="grey"
......@@ -192,6 +373,7 @@ const ItemScreen = ({navigation}) => {
></TouchableOpacity>
{addItemModal()}
{ManageItemModal()}
</View>
);
};
......
import React, { useEffect, useState } from 'react';
import { View, Text, TouchableOpacity, SafeAreaView, StyleSheet, Image, FlatList, Modal, Alert, TextInput, PermissionsAndroid, Platform, button} from 'react-native';
import { View, Text, TouchableOpacity, SafeAreaView, StyleSheet, Image, FlatList, Modal, Alert, TextInput, PermissionsAndroid, Platform, Button, AsyncStorage} from 'react-native';
import { openDatabase } from 'react-native-sqlite-storage';
import {launchCamera, launchImageLibrary} from 'react-native-image-picker';
import InputSpinner from 'react-native-input-spinner';
......@@ -8,6 +8,7 @@ import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
import AntDesign from 'react-native-vector-icons/AntDesign';
import ItemScreen from '../ItemScreen';
import AddItemScreen from '../AddItemScreen';
const write = require('../../images/write.png');
const plusbutton = require('../../images/plusbutton.png');
// const editbutton = require('../../images/editbutton.png');
// const deletebutton = require ('../../images/deletebutton.png');
......@@ -20,15 +21,11 @@ const ListScreen = ({navigation}) => {
const [deleteModalVisible, setDeleteModalVisible] = useState(false);
const [manageListModalVisible, setManageListModalVisible] = useState(false);
const [confirmEditModalVisible, setConfirmEditModalVisible] = useState(false);
const [id, setId] = useState ('');
const [name, setName] = useState('');
const [quantity, setQuantity] = useState(0);
const [image, setImage] = useState('');
const [updateItem, setUpdateItem] = useState ([]);
const [items, setItems] = useState ([]);
const [emptyList, setEmptyList] = useState ([]);
const [selectedId, setSelectedId] = useState ('');
const [imageUri, setImageUri]= useState('');
// create table
useEffect(() => {
......@@ -37,11 +34,11 @@ const ListScreen = ({navigation}) => {
"SELECT name from sqlite_master WHERE type='table' AND name='list'",
[],
function (tx, res) {
console.log('item:', res.rows.length);
console.log('item: ', res.rows.length);
if (res.rows.length == 0) {
txn.executeSql('DROP TABLE IF EXISTS list', []);
txn.executeSql(
'CREATE TABLE IF NOT EXISTS list(id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(100), quantity INT(10), image LONGTEXT)',
'CREATE TABLE IF NOT EXISTS list(id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(100))',
[],
);
}
......@@ -50,34 +47,55 @@ const ListScreen = ({navigation}) => {
});
}, []);
useEffect(() => {
db.transaction(function (txn) {
txn.executeSql(
"SELECT name from sqlite_master WHERE type='table' AND name='product'",
[],
function (tx, res) {
console.log('item: ', res.rows.length);
if (res.rows.length == 0) {
txn.executeSql('DROP TABLE IF EXISTS product', []);
txn.executeSql(
'CREATE TABLE IF NOT EXISTS product(id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(100), quantity INT(10), image LONGTEXT)',
[],
);
}
},
);
});
}, []);
// add into list
const insertList = () => {
console.log(name, quantity, imageUri);
console.log(name);
if (name == '') {
alert('Please enter name');
// return;
alert('Please enter list');
}
// else if (quantity == 0){
// alert('Please enter quantity');
// }
// else if (imageUri == ''){
// alert('Please insert photo');
// }
else{
setAddModalVisible(false)
db.transaction(function (tx) {
tx.executeSql(
'INSERT INTO list (name, quantity, image) VALUES (?,?,?)',
[name, quantity, imageUri],
'INSERT INTO list (name) VALUES (?)',
[name],
(tx, results) => {
console.log('Data insert :', results.rowsAffected);
console.log('Data insert : ', results.rowsAffected);
if (results.rowsAffected > 0) {
Alert.alert(
'Success!',
'Data inserted successfully',
'Data inserted successfully.',
[
{
text: 'Ok',
onPress: () => navigation.navigate('ItemScreen'),
},
],
{ cancelable: false }
);
onRefresh()
setName(''), setQuantity(0), setImageUri('')
setName('')
} else alert('Add list failed');
},(error)=>{
console.log(JSON.stringify(error))
......@@ -94,20 +112,18 @@ useEffect(() => {
// update list
const updateList = () => {
console.log(selectedId, name, quantity, image);
console.log(updateItem.name, updateItem.quantity, updateItem.image);
console.log(selectedId, name);
console.log(updateItem.name);
var n = ''
var q = 0
var i = ''
if (name == '' && updateItem.name == ''){
alert('Please enter name');
}
else if (quantity == 0 && updateItem.quantity == 0){
alert('Please enter quantity');
}
else if (image == '' && updateItem.image == ''){
alert('')
}
// else if (quantity == 0 && updateItem.quantity == 0){
// alert('Please enter quantity');
// }
// else if (image == '' && updateItem.image == ''){
// alert('')
// }
else {
if(name == ''){
n = updateItem.name
......@@ -115,25 +131,13 @@ const updateList = () => {
else{
n = name
}
if(quantity == 0){
q = updateItem.quantity
}
else{
q = quantity
}
if(image == ''){
i = updateItem.image
}
else{
i = image
}
console.log(n,q,i)
console.log(n)
setEditModalVisible(false)
setManageListModalVisible(false)
db.transaction((tx) => {
tx.executeSql(
'UPDATE list set name = ?, quantity = ?, image = ? where id = ?',
[n, q, i, selectedId],
'UPDATE list set name = ? where id = ?',
[n, selectedId],
(tx, results) => {
console.log('Data update: ', JSON.stringify(results));
if (results.rowsAffected > 0) {
......@@ -149,7 +153,7 @@ const updateList = () => {
{ cancelable: false }
);
onRefresh()
setName(''), setQuantity(0), setImage('')
setName('')
} (error)=>{
console.log(JSON.stringify(error))
}
......@@ -161,7 +165,7 @@ const updateList = () => {
//delete list
const deleteList = () => {
console.log('Delete item ' + selectedId)
console.log('Delete item : ' + selectedId)
var temp = selectedId
setDeleteModalVisible(false)
setManageListModalVisible(false)
......@@ -184,7 +188,7 @@ const deleteList = () => {
{ cancelable: false }
);
onRefresh()
setName(''), setQuantity(0), setImage('')
setName('')
}
},(error)=>{
console.log(JSON.stringify(error))
......@@ -232,11 +236,20 @@ const emptyMessage = (status) => {
style={{
justifyContent: 'center',
alignItems: 'center',
alignSelf:'center',
alignContent:'center',
flex: 1 ,
marginLeft:10,
marginRight:10,
flexDirection:'column'
}}>
<Image
style={{
width:150,
height:150
}}
source={write}
/>
<Text
style={{
fontSize: 20,
......@@ -260,129 +273,23 @@ const emptyMessage = (status) => {
);
}
const requestCameraPermission = async () => {
try {
const granted = await PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.CAMERA,
{
title: "Cool Photo App Camera Permission",
message:
"Cool Photo App needs access to your camera " +
"so you can take awesome pictures.",
buttonNeutral: "Ask Me Later",
buttonNegative: "Cancel",
buttonPositive: "OK"
}
);
if (granted === PermissionsAndroid.RESULTS.GRANTED) {
console.log("You can use the camera");
} else {
console.log("Camera permission denied");
}
} catch (err) {
console.warn(err);
}
};
const requestExternalWritePermission = async () => {
if (Platform.OS === 'android') {
try {
const granted = await PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE,
{
title: 'External Storage Write Permission',
message: 'App needs write permission',
},
);
// If WRITE_EXTERNAL_STORAGE Permission is granted
return granted === PermissionsAndroid.RESULTS.GRANTED;
} catch (err) {
console.warn(err);
alert('Write permission err', err);
}
return false;
} else return true;
};
const openCamera = () => {
requestCameraPermission()
const options={
storageOption : {
path:'images',
mediaType:'photo',
},
includeBase64: true,
};
launchCamera(options, response => {
console.log('Response = ', response);
if (response.didCancel) {
console.log('User cancelled image picker');
} else if (response.error) {
console.log('ImagePicker Error: ', response.error);
} else if (response.customButton) {
console.log('User tapped custom button: ', response.customButton);
alert(response.customButton);
} else {
console.log('Response else = ', response);
const source = response.assets[0].uri
console.log(source)
setImage(source);
setImageUri(source);
setAddImageVisible(false);
}
});
};
const openGallery = () => {
requestExternalWritePermission()
const options={
storageOption : {
path:'images',
mediaType:'photo',
},
includeBase64: true,
};
launchImageLibrary(options, response => {
console.log('Response = ', response);
if (response.didCancel) {
console.log('User cancelled image picker');
} else if (response.error) {
console.log('ImagePicker Error: ', response.error);
} else if (response.customButton) {
console.log('User tapped custom button: ', response.customButton);
alert(response.customButton);
} else {
const source = response.assets[0].uri
console.log(source)
setImage(source);
setImageUri(source);
setAddImageVisible(false);
}
});
};
const listItemView = ( item ) => (
<View
style = {
styles.outerContainer
}>
<View
<TouchableOpacity
style = {
styles.listCard
}>
}
onPress={() => navigation.navigate('ItemScreen')}
>
<View
style={{
flexDirection:'row'
}}>
<View
style = {styles.imageContainer}>
{/* <Image
style = {[styles.imageSize,{}]}
source={{uri : item.image}}
/> */}
<View
style={{
flexDirection:'row',
......@@ -401,54 +308,23 @@ const listItemView = ( item ) => (
flexDirection:'row'
}}>
</View>
{/* <Text
style={[
styles.textName,
{}
]}>
Quantity: {item.quantity}
</Text> */}
</View>
<TouchableOpacity style={{marginHorizontal:150, width:'50%'}} onPress={()=>setManageListModalVisible(true)}>
<TouchableOpacity
style={{
marginHorizontal:150,
width:'50%'
}}
onPress={()=>{setManageListModalVisible(true), setUpdateItem(item), setSelectedId(item.id)}}
>
<MaterialIcons
name="more-vert"
color="grey"
size={30}
/>
</TouchableOpacity>
<View>
{/* <Text>Test : {item.quantity}</Text> */}
</View>
{/* <TouchableOpacity
style={[
styles.editDeleteContainer,
{}
]}
onPress = {()=>{setEditModalVisible(true), setUpdateItem(item), setSelectedId(item.id), setImage(item.image)}}
>
<MaterialCommunityIcons
name="square-edit-outline"
size={30}
color='white'
/>
</TouchableOpacity>
<TouchableOpacity
style={[
styles.editDeleteContainer,
{marginHorizontal:10,}
]}
onPress = {()=>{setDeleteModalVisible(true), setSelectedId(item.id)}}
>
<MaterialCommunityIcons
name="delete"
size={30}
color='white'
/>
</TouchableOpacity> */}
</View>
</View>
</View>
</TouchableOpacity>
</View>
)
......@@ -467,7 +343,7 @@ const listItemView = ( item ) => (
style={{
height:'100%',
width:'100%',
backgroundColor:'rgba(192,192,192,0.8)',
backgroundColor:'rgba(0,0,0,.5)',
justifyContent:'center',
alignItems:'center'
}}>
......@@ -572,7 +448,7 @@ const listItemView = ( item ) => (
style={{
height:'100%',
width:'100%',
backgroundColor:'rgba(192,192,192,0.8)',
backgroundColor:'rgba(0,0,0,.5)',
justifyContent:'center',
alignItems:'center'
}}>
......@@ -602,7 +478,7 @@ const listItemView = ( item ) => (
alignSelf:'center',
marginTop:20
}}>
Photo
Manage list
</Text>
<TouchableOpacity
style={{
......@@ -610,10 +486,10 @@ const listItemView = ( item ) => (
flexDirection:'row',
marginTop:20,
}}
onPress={()=> setEditModalVisible(true)}
onPress={()=> {setEditModalVisible(true)}}
>
<MaterialCommunityIcons
name="camera"
name="pencil"
size={30}
color="#838383"
/>
......@@ -636,7 +512,7 @@ const listItemView = ( item ) => (
flexDirection:'row',
marginTop:20,
}}
onPress={()=>setDeleteModalVisible(true)}
onPress={()=>{setDeleteModalVisible(true)}}
>
<MaterialCommunityIcons
name="delete"
......@@ -680,7 +556,7 @@ const listItemView = ( item ) => (
style={{
height:'100%',
width:'100%',
backgroundColor:'rgba(192,192,192,0.8)',
backgroundColor:'rgba(0,0,0,.5)',
justifyContent:'center',
alignItems:'center'
}}>
......@@ -695,17 +571,18 @@ const listItemView = ( item ) => (
}}
onPress={() => setAddModalVisible(false)}
/>
<View style={styles.addModalView}>
<View style={styles.modalView}>
<View
style={{
alignItems:'center',
marginTop:35,
// marginTop:35,
}}>
<Text
style={{
fontSize:20,
color:'black',
fontFamily:'Poppins-Regular'
fontFamily:'Poppins-SemiBold',
marginTop:20,
}}>
Create new list
</Text>
......@@ -721,9 +598,9 @@ const listItemView = ( item ) => (
backgroundColor:'#ededed',
borderRadius:9,
width:275,
height:50,
height:60,
marginHorizontal:19,
marginTop:10,
marginTop:15,
// elevation:8,
// borderWidth:0.2,
// borderColor:'white',
......@@ -789,8 +666,7 @@ const listItemView = ( item ) => (
style={{
marginHorizontal:5
}}
onPress={() => navigation.navigate('ItemScreen')}
// onPress={insertList}
onPress={insertList}
>
<View
style={{
......@@ -836,7 +712,7 @@ const EditListModal = () => {
style={{
height:'100%',
width:'100%',
backgroundColor:'rgba(192,192,192,0.8)',
backgroundColor:'rgba(0,0,0,.5)',
justifyContent:'center',
alignItems:'center'
}}>
......@@ -851,7 +727,7 @@ const EditListModal = () => {
}}
onPress={() => setEditModalVisible(false)}
/>
<View style={styles.addModalView}>
<View style={styles.modalView}>
<View
style={{
alignItems:'center',
......@@ -894,7 +770,7 @@ const EditListModal = () => {
textAlignVertical:'top',
width:'100%'
}}
placeholder="Rename List"
placeholder={updateItem.name}
placeholderTextColor="grey"
onChangeText={(name) => setName(name)}
......@@ -943,7 +819,7 @@ const EditListModal = () => {
marginHorizontal:5
}}
// onPress={() => navigation.navigate('ItemScreen')}
// onPress={updateList}
onPress={updateList}
>
<View
style={{
......@@ -988,7 +864,7 @@ const DeleteListModal = () => {
style={{
height:'100%',
width:'100%',
backgroundColor:'rgba(192,192,192,0.8)',
backgroundColor:'rgba(0,0,0,.5)',
justifyContent:'center',
alignItems:'center'
}}>
......@@ -1110,7 +986,7 @@ const confirmEditModal = () => {
style={{
height:'100%',
width:'100%',
backgroundColor:'rgba(192,192,192,0.8)',
backgroundColor:'rgba(0,0,0,.5)',
justifyContent:'center',
alignItems:'center'
}}>
......@@ -1185,7 +1061,7 @@ const confirmEditModal = () => {
<TouchableOpacity
style={{
marginHorizontal:5}}
onPress={()=>{setConfirmEditModalVisible(false), setEditModalVisible(false), setManageListModalVisible(false)}}
onPress={()=>{setConfirmEditModalVisible(false), setManageListModalVisible(false), setEditModalVisible(false)}}
>
<View
style={{
......@@ -1213,7 +1089,6 @@ const confirmEditModal = () => {
</Modal>
)
}
}
return (
<SafeAreaView
......@@ -1232,7 +1107,7 @@ const confirmEditModal = () => {
data={items}
ItemSeparatorComponent={listViewItemSeparator}
keyExtractor={(item,index) => index.toString()}
renderItem={({item}) => listItemView(item)}
renderItem={({ item }) => listItemView(item)}
/>
}
<TouchableOpacity
......@@ -1268,7 +1143,7 @@ const confirmEditModal = () => {
/>
<Text
style={{
fontFamily:'Poppins-Regular',
fontFamily:'Poppins-SemiBold',
fontSize:18,
color:'white',
alignSelf:'center',
......@@ -1383,41 +1258,14 @@ const styles = StyleSheet.create({
marginTop: 22,
// backgroundColor:'white',
},
addModalView:{
position:'absolute',
marginHorizontal:100,
modalView:{
backgroundColor:'white',
borderRadius:20,
// padding:25,
width:'80%',
width:"80%",
height:300,
// justifyContent:'center',
// alignItems:'center',
shadowOffset:{
width:0,
height:2
},
shadowOpacity:0.25,
shadowRadius:4,
elevation:5
},
editModalView:{
position:'absolute',
marginHorizontal:100,
backgroundColor:'pink',
justifyContent:'flex-start',
// position:'absolute',
// bottom:0,
borderRadius:20,
padding:25,
width:'80%',
height:450,
// justifyContent:'center',
// alignItems:'center',
shadowOffset:{
width:0,
height:2
},
shadowOpacity:0.25,
shadowRadius:4,
elevation:5
},
deleteModalView:{
position:'absolute',
......
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