Skip to content

Commit 834d062

Browse files
Merge pull request #7 from rafi-zimraan/main
Finishing fitur DrawerLayoutAndroid
2 parents 8f0f913 + 33066c2 commit 834d062

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+785
-154
lines changed

Diff for: android/app/build.gradle

+9
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,14 @@ android {
229229
keyAlias 'androiddebugkey'
230230
keyPassword 'android'
231231
}
232+
release {
233+
if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
234+
storeFile file(MYAPP_UPLOAD_STORE_FILE)
235+
storePassword MYAPP_UPLOAD_STORE_PASSWORD
236+
keyAlias MYAPP_UPLOAD_KEY_ALIAS
237+
keyPassword MYAPP_UPLOAD_KEY_PASSWORD
238+
}
239+
}
232240
}
233241
buildTypes {
234242
debug {
@@ -240,6 +248,7 @@ android {
240248
signingConfig signingConfigs.debug
241249
minifyEnabled enableProguardInReleaseBuilds
242250
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
251+
signingConfig signingConfigs.release
243252
}
244253
}
245254

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/ic_launcher_background"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5+
</adaptive-icon>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/ic_launcher_background"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5+
</adaptive-icon>

Diff for: android/app/src/main/res/mipmap-hdpi/ic_launcher.png

-13.9 KB
Loading
8.45 KB
Loading
-18.6 KB
Loading

Diff for: android/app/src/main/res/mipmap-ldpi/ic_launcher.png

1.1 KB
Loading

Diff for: android/app/src/main/res/mipmap-mdpi/ic_launcher.png

-15.4 KB
Loading
3.58 KB
Loading
-20.8 KB
Loading
-13.6 KB
Loading
Loading
-17.4 KB
Loading
-9.86 KB
Loading
Loading
-12 KB
Loading
-7.83 KB
Loading
Loading
-8.14 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color name="ic_launcher_background">#e7d8d5</color>
4+
</resources>

Diff for: android/gradle.properties

+4
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
3838
# to write custom TurboModules/Fabric components OR use libraries that
3939
# are providing them.
4040
newArchEnabled=false
41+
MYAPP_UPLOAD_STORE_FILE=my-upload-key.keystore
42+
MYAPP_UPLOAD_KEY_ALIAS=my-key-alias
43+
MYAPP_UPLOAD_STORE_PASSWORD=12345678
44+
MYAPP_UPLOAD_KEY_PASSWORD=12345678

Diff for: src/assets/icons/IconUser.png

483 Bytes
Loading

Diff for: src/assets/icons/VectorTambah.png

1.69 KB
Loading

Diff for: src/assets/icons/gmail.png

7.1 KB
Loading

Diff for: src/assets/icons/goggleMap.png

20.8 KB
Loading

Diff for: src/assets/icons/logOut.png

12.7 KB
Loading

Diff for: src/assets/icons/right.png

319 Bytes
Loading

Diff for: src/assets/icons/setting.png

632 Bytes
Loading

Diff for: src/assets/images/BgLogo.png

33.7 KB
Loading

Diff for: src/assets/images/logoMuslimIndo.jpg

61.1 KB
Loading

Diff for: src/assets/index.js

+9
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ const images = {
1717
mapsMuslimIndonesia: require('../assets/images/mapsMuslimIndonesia.png'),
1818
food: require('../assets/images/food.jpg'),
1919
posterkajian: require('../assets/images/posterKajian.png'),
20+
logoMuslimIndo: require('../assets/images/logoMuslimIndo.jpg'),
21+
BgLogo: require('../assets/images/BgLogo.png'),
2022
};
2123

2224
// ! Icons
@@ -33,6 +35,13 @@ const icons = {
3335
location: require('../assets/icons/Location.png'),
3436
vectorSave: require('../assets/icons/VectorSave.png'),
3537
clock: require('../assets/icons/clock.png'),
38+
setting: require('../assets/icons/setting.png'),
39+
IconUser: require('../assets/icons/IconUser.png'),
40+
VectorTambah: require('../assets/icons/VectorTambah.png'),
41+
gmail: require('../assets/icons/gmail.png'),
42+
right: require('../assets/icons/right.png'),
43+
logOut: require('../assets/icons/logOut.png'),
44+
goggleMap: require('../assets/icons/goggleMap.png'),
3645
};
3746

3847
// ! Export all assets files

Diff for: src/components/ButtonCustom.js

+30-26
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,41 @@
11
import React from 'react';
2-
import { TouchableOpacity, Text, StyleSheet, Dimensions } from 'react-native';
3-
import { fonts } from '../assets';
4-
import { colors } from '../utils';
2+
import {TouchableOpacity, Text, StyleSheet, Dimensions} from 'react-native';
3+
import {fonts} from '../assets';
4+
import {colors} from '../utils';
5+
import {
6+
widthPercentageToDP as wp,
7+
heightPercentageToDP as hp,
8+
} from 'react-native-responsive-screen';
59

610
const width = Dimensions.get('window').width;
711

812
const ButtonCustom = ({
9-
title = 'Button',
10-
onPress,
11-
color = colors.primary,
12-
buttonStyle
13+
title = 'Button',
14+
onPress,
15+
color = colors.primary,
16+
buttonStyle,
1317
}) => {
14-
return (
15-
<TouchableOpacity
16-
style = {[ buttonStyle, styles.button, { backgroundColor : color } ]}
17-
onPress = { onPress }>
18-
<Text style = { styles.text }>{title}</Text>
19-
</TouchableOpacity>
20-
);
18+
return (
19+
<TouchableOpacity
20+
style={[buttonStyle, styles.button, {backgroundColor: color}]}
21+
onPress={onPress}>
22+
<Text style={styles.text}>{title}</Text>
23+
</TouchableOpacity>
24+
);
2125
};
2226

2327
const styles = StyleSheet.create({
24-
button : {
25-
paddingVertical : 10,
26-
paddingHorizontal : width * 0.2,
27-
justifyContent : 'center',
28-
alignItems : 'center',
29-
borderRadius : 5,
30-
elevation : 5,
31-
},
32-
text : {
33-
fontFamily : fonts.PoppinsRegular,
34-
color : colors.white,
35-
},
28+
button: {
29+
marginLeft: '80%',
30+
marginRight: 25,
31+
justifyContent: 'flex-end',
32+
alignItems: 'center',
33+
borderRadius: 5,
34+
elevation: 5,
35+
},
36+
text: {
37+
fontFamily: fonts.PoppinsRegular,
38+
color: colors.white,
39+
},
3640
});
3741
export default ButtonCustom;

Diff for: src/routes/MainNavigator.js

-6
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ const MainNavigator = () => {
6060
<Tab.Screen
6161
name="Profile"
6262
component={Setting}
63-
barStyle={styles.setting}
6463
options={{
6564
tabBarLabel: 'Profile',
6665
tabBarIcon: ({color}) => (
@@ -74,7 +73,6 @@ const MainNavigator = () => {
7473

7574
const styles = StyleSheet.create({
7675
barStyle: {
77-
backgroundColor: colors.white,
7876
borderTopRightRadius: 30,
7977
borderTopLeftRadius: 30,
8078
paddingHorizontal: 8,
@@ -84,9 +82,5 @@ const styles = StyleSheet.create({
8482
width: wp('100%'),
8583
// position: 'absolute', //use if you want to absolute navbar
8684
},
87-
setting: {
88-
boderTopRightRadius: 30,
89-
borderTopLeftRadius: 30,
90-
},
9185
});
9286
export default MainNavigator;

Diff for: src/routes/index.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
import * as React from 'react';
22
import {NavigationContainer} from '@react-navigation/native';
33
import {createNativeStackNavigator} from '@react-navigation/native-stack';
4-
import {ForgotPassword, Login, NewPassword, Register, Splash} from '../screens';
4+
import {
5+
EditProfile,
6+
ForgotPassword,
7+
Login,
8+
NewPassword,
9+
Register,
10+
Splash,
11+
} from '../screens';
512
import MainNavigator from './MainNavigator';
613

714
const Stack = createNativeStackNavigator();
@@ -19,6 +26,7 @@ const AppNavigator = () => {
1926
<Stack.Screen name="ForgotPassword" component={ForgotPassword} />
2027
<Stack.Screen name="MainNavigator" component={MainNavigator} />
2128
<Stack.Screen name="NewPassword" component={NewPassword} />
29+
<Stack.Screen name="EditProfile" component={EditProfile} />
2230
</Stack.Navigator>
2331
</NavigationContainer>
2432
);

Diff for: src/screens/EditProfile/EditProfile.js

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
import React from 'react';
2+
import {
3+
SafeAreaView,
4+
StatusBar,
5+
StyleSheet,
6+
Text,
7+
View,
8+
TouchableOpacity,
9+
Image,
10+
} from 'react-native';
11+
import {colors, dimens} from '../../utils';
12+
import {
13+
widthPercentageToDP as wp,
14+
heightPercentageToDP as hp,
15+
} from 'react-native-responsive-screen';
16+
import {useContext} from 'react';
17+
import {GlobalContext} from '../../Store/globalContext';
18+
import {fonts, icons, images} from '../../assets';
19+
20+
const EditProfile = () => {
21+
const globaleContext = useContext(GlobalContext);
22+
const dark = globaleContext.state.isDark;
23+
24+
return (
25+
<SafeAreaView style={styles.container}>
26+
<StatusBar barStyle={'light-content'} backgroundColor={colors.green} />
27+
<View style={styles.body}>
28+
<View
29+
style={{
30+
marginTop: '10%',
31+
height: '10%',
32+
justifyContent: 'center',
33+
alignItems: 'center',
34+
}}>
35+
<TouchableOpacity>
36+
<Image
37+
source={images.user}
38+
style={{height: hp('11%'), width: wp('23%')}}
39+
/>
40+
</TouchableOpacity>
41+
<Text style={styles.TxtTitle}>Edit Profile</Text>
42+
</View>
43+
44+
{/* CONTENT PROFILE */}
45+
<View
46+
style={[
47+
styles.ContentProfile,
48+
{
49+
backgroundColor: dark ? colors.black : colors.white,
50+
},
51+
]}></View>
52+
</View>
53+
</SafeAreaView>
54+
);
55+
};
56+
57+
export default EditProfile;
58+
59+
const styles = StyleSheet.create({
60+
container: {
61+
flex: 1,
62+
backgroundColor: colors.green,
63+
},
64+
body: {
65+
height: '100%',
66+
width: '100%',
67+
backgroundColor: colors.green,
68+
},
69+
TxtTitle: {
70+
fontFamily: fonts.PoppinsMedium,
71+
paddingTop: 10,
72+
},
73+
ContentProfile: {
74+
backgroundColor: colors.white,
75+
height: hp('100%'),
76+
borderTopLeftRadius: 50,
77+
borderTopRightRadius: 50,
78+
marginTop: '80%',
79+
},
80+
81+
line: {
82+
borderWidth: 0.4,
83+
borderRadius: 10,
84+
width: wp('75%'),
85+
top: '13%',
86+
marginLeft: 10,
87+
},
88+
});

Diff for: src/screens/EditProfile/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import EditProfile from './EditProfile';
2+
3+
export {EditProfile};

Diff for: src/screens/ForgotPassword/ForgotPassword.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ const styles = StyleSheet.create({
147147
},
148148
line: {
149149
width: wp('40%'),
150-
borderWidth: 3,
150+
borderWidth: 1.8,
151151
color: colors.black,
152152
marginTop: '27%',
153153
marginLeft: 128,
154-
borderRadius: 20,
154+
borderRadius: 10,
155155
},
156156
});

Diff for: src/screens/Home/Home.js

+9-8
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ const styles = StyleSheet.create({
184184
},
185185
headerTxtWelcome: {
186186
marginTop: '5%',
187-
marginLeft: 20,
187+
marginLeft: 10,
188188
},
189189
viewMuslimIndonesia: {
190190
flexDirection: 'row',
@@ -206,7 +206,6 @@ const styles = StyleSheet.create({
206206
paddingLeft: 5,
207207
},
208208
bodyTxtUser: {
209-
marginTop: '3%',
210209
flexDirection: 'row',
211210
justifyContent: 'space-between',
212211
},
@@ -219,14 +218,14 @@ const styles = StyleSheet.create({
219218
justifyContent: 'flex-end',
220219
flexDirection: 'row',
221220
bottom: '65%',
222-
marginRight: '5%',
221+
marginRight: '2%',
223222
},
224223
imgNotif: {
225224
height: hp('4%'),
226225
width: wp('8%'),
227226
},
228227
imgUser: {
229-
height: hp('7%'),
228+
height: hp('7.3%'),
230229
width: wp('15%'),
231230
},
232231
textInput: {
@@ -248,6 +247,8 @@ const styles = StyleSheet.create({
248247
ViewTextInput: {
249248
height: hp('7%'),
250249
width: wp('80%'),
250+
textShadowColor: '#688F16',
251+
color: colors.black,
251252
},
252253
contentCarosel: {
253254
marginHorizontal: 20,
@@ -275,11 +276,11 @@ const styles = StyleSheet.create({
275276
bottomDate: {
276277
justifyContent: 'center',
277278
alignItems: 'center',
278-
bottom: 45,
279+
bottom: 37,
279280
backgroundColor: colors.white,
280-
marginLeft: '61%',
281+
marginLeft: '59%',
281282
height: hp('4%'),
282-
width: wp('33%'),
283+
width: wp('35%'),
283284
borderRadius: 10,
284285
},
285286
viewBottom: {
@@ -306,7 +307,7 @@ const styles = StyleSheet.create({
306307
bodyTopTab: {
307308
backgroundColor: colors.white,
308309
height: hp('100%'),
309-
marginTop: '12%',
310+
marginTop: '20%',
310311
borderTopRightRadius: 40,
311312
borderTopLeftRadius: 40,
312313
},

0 commit comments

Comments
 (0)