File tree Expand file tree Collapse file tree 12 files changed +104
-253
lines changed
app/src/main/java/edu/upenn/cis573/jobboard
build/intermediates/dex-cache Expand file tree Collapse file tree 12 files changed +104
-253
lines changed Original file line number Diff line number Diff line change @@ -89,35 +89,41 @@ else if (map.containsKey(s))
89
89
}
90
90
}
91
91
public void displayProfile (View view ) {
92
+ finish ();
92
93
Intent intent = new Intent (this , ProfileActivity .class );
93
94
startActivity (intent );
94
95
}
95
96
96
97
//go to the cart screen
97
98
public void displayCart (View view ) {
99
+ finish ();
98
100
Intent intent = new Intent (this , CartActivity .class );
99
101
startActivity (intent );
100
102
}
101
103
102
104
// go to the job creation screen
103
105
public void viewNotifications (View view ) {
106
+ finish ();
104
107
Intent intent = new Intent (this , NotificationsPageActivity .class );
105
108
startActivity (intent );
106
109
}
107
110
108
111
// go to the MyPostedJobs screen
109
112
public void displayMyPostedJobs (View view ) {
113
+ finish ();
110
114
Intent intent = new Intent (this , MyPostedJobsActivity .class );
111
115
startActivity (intent );
112
116
}
113
117
114
118
//button logic to go to the homepage screen
115
119
public void displayHomepage (View view ) {
120
+ finish ();
116
121
Intent intent = new Intent (this , HomepageActivity .class );
117
122
startActivity (intent );
118
123
}
119
124
120
125
public void viewMessages (View view ) {
126
+ finish ();
121
127
Intent intent = new Intent (this , ChatActivity .class );
122
128
startActivity (intent );
123
129
}
Original file line number Diff line number Diff line change 9
9
import android .os .Build ;
10
10
import android .os .Bundle ;
11
11
import android .util .Log ;
12
+ import android .view .KeyEvent ;
12
13
import android .view .Menu ;
13
14
import android .view .MenuItem ;
14
15
import android .view .View ;
@@ -172,6 +173,17 @@ public void logoutUser() {
172
173
intent .addFlags (Intent .FLAG_ACTIVITY_CLEAR_TASK | Intent .FLAG_ACTIVITY_NEW_TASK );
173
174
startActivity (intent );
174
175
}
176
+ /* @Override
177
+ public boolean onKeyDown(int keyCode, KeyEvent event)
178
+ {
179
+ if ((keyCode == KeyEvent.KEYCODE_BACK))
180
+ {
181
+ finish();
182
+ Intent intent = new Intent(this, HomepageActivity.class);
183
+ startActivity(intent);
184
+ }
185
+ return super.onKeyDown(keyCode, event);
186
+ }*/
175
187
176
188
177
189
}
Original file line number Diff line number Diff line change 3
3
import android .app .Activity ;
4
4
import android .content .Intent ;
5
5
import android .os .Bundle ;
6
+ import android .view .KeyEvent ;
6
7
7
8
import com .parse .ParseUser ;
8
9
@@ -27,4 +28,15 @@ protected void onCreate(Bundle savedInstanceState) {
27
28
startActivity (new Intent (this , SignInActivity .class ));
28
29
}
29
30
}
31
+ @ Override
32
+ public boolean onKeyDown (int keyCode , KeyEvent event )
33
+ {
34
+ if ((keyCode == KeyEvent .KEYCODE_BACK ))
35
+ {
36
+ finish ();
37
+ Intent intent = new Intent (this , HomepageActivity .class );
38
+ startActivity (intent );
39
+ }
40
+ return super .onKeyDown (keyCode , event );
41
+ }
30
42
}
Original file line number Diff line number Diff line change 10
10
import android .os .Build ;
11
11
import android .os .Bundle ;
12
12
import android .util .Log ;
13
+ import android .view .KeyEvent ;
13
14
import android .view .Menu ;
14
15
import android .view .MenuItem ;
15
16
import android .view .View ;
@@ -234,5 +235,14 @@ public void logoutUser() {
234
235
intent .addFlags (Intent .FLAG_ACTIVITY_CLEAR_TASK | Intent .FLAG_ACTIVITY_NEW_TASK );
235
236
startActivity (intent );
236
237
}
238
+ /* @Override
239
+ public boolean onKeyDown(int keyCode, KeyEvent event)
240
+ {
241
+ if ((keyCode == KeyEvent.KEYCODE_BACK))
242
+ {
243
+ finish();
244
+ }
245
+ return super.onKeyDown(keyCode, event);
246
+ }*/
237
247
238
248
}
Original file line number Diff line number Diff line change 9
9
import android .location .LocationManager ;
10
10
import android .os .Bundle ;
11
11
import android .util .Log ;
12
+ import android .view .KeyEvent ;
12
13
import android .view .Menu ;
13
14
import android .view .MenuItem ;
14
15
import android .view .View ;
@@ -252,6 +253,16 @@ public void logoutUser() {
252
253
intent .addFlags (Intent .FLAG_ACTIVITY_CLEAR_TASK | Intent .FLAG_ACTIVITY_NEW_TASK );
253
254
startActivity (intent );
254
255
}
255
-
256
+ /*@Override
257
+ public boolean onKeyDown(int keyCode, KeyEvent event)
258
+ {
259
+ if ((keyCode == KeyEvent.KEYCODE_BACK))
260
+ {
261
+ finish();
262
+ Intent intent = new Intent(this, HomepageActivity.class);
263
+ startActivity(intent);
264
+ }
265
+ return super.onKeyDown(keyCode, event);
266
+ }*/
256
267
257
268
}
Original file line number Diff line number Diff line change 3
3
import android .content .Intent ;
4
4
import android .os .Bundle ;
5
5
import android .util .Log ;
6
+ import android .view .KeyEvent ;
6
7
import android .view .Menu ;
7
8
import android .view .MenuItem ;
8
9
import android .view .View ;
@@ -398,5 +399,13 @@ public void logoutUser() {
398
399
intent .addFlags (Intent .FLAG_ACTIVITY_CLEAR_TASK | Intent .FLAG_ACTIVITY_NEW_TASK );
399
400
startActivity (intent );
400
401
}
401
-
402
+ /*@Override
403
+ public boolean onKeyDown(int keyCode, KeyEvent event)
404
+ {
405
+ if ((keyCode == KeyEvent.KEYCODE_BACK))
406
+ {
407
+ finish();
408
+ }
409
+ return super.onKeyDown(keyCode, event);
410
+ }*/
402
411
}
Original file line number Diff line number Diff line change 5
5
import android .graphics .Color ;
6
6
import android .os .Bundle ;
7
7
import android .util .Log ;
8
+ import android .view .KeyEvent ;
8
9
import android .view .Menu ;
9
10
import android .view .MenuItem ;
10
11
import android .view .View ;
@@ -208,4 +209,15 @@ public void logoutUser() {
208
209
intent .addFlags (Intent .FLAG_ACTIVITY_CLEAR_TASK | Intent .FLAG_ACTIVITY_NEW_TASK );
209
210
startActivity (intent );
210
211
}
212
+ /* @Override
213
+ public boolean onKeyDown(int keyCode, KeyEvent event)
214
+ {
215
+ if ((keyCode == KeyEvent.KEYCODE_BACK))
216
+ {
217
+ finish();
218
+ Intent intent = new Intent(this, HomepageActivity.class);
219
+ startActivity(intent);
220
+ }
221
+ return super.onKeyDown(keyCode, event);
222
+ }*/
211
223
}
Original file line number Diff line number Diff line change 5
5
import android .graphics .Color ;
6
6
import android .os .Bundle ;
7
7
import android .util .Log ;
8
+ import android .view .KeyEvent ;
8
9
import android .view .Menu ;
9
10
import android .view .MenuItem ;
10
11
import android .view .View ;
@@ -182,8 +183,9 @@ public boolean onOptionsItemSelected(MenuItem item) {
182
183
public void logoutUser () {
183
184
//Parse method to log out by removing CurrentUser
184
185
ParseUser .logOut ();
185
- Intent intent = new Intent (MyPostedJobsActivity .this , CurrentUserActivity .class );
186
+ Intent intent = new Intent (MyPostedJobsActivity .this , SignInActivity .class );
186
187
intent .addFlags (Intent .FLAG_ACTIVITY_CLEAR_TASK | Intent .FLAG_ACTIVITY_NEW_TASK );
187
188
startActivity (intent );
188
189
}
190
+
189
191
}
Original file line number Diff line number Diff line change 11
11
import android .os .Build ;
12
12
import android .os .Bundle ;
13
13
import android .util .Log ;
14
+ import android .view .KeyEvent ;
14
15
import android .view .Menu ;
15
16
import android .view .MenuItem ;
16
17
import android .view .View ;
@@ -266,5 +267,15 @@ public void displayHomepage(View view) {
266
267
Intent intent = new Intent(this, HomepageActivity.class);
267
268
startActivity(intent);
268
269
}*/
269
-
270
+ /* @Override
271
+ public boolean onKeyDown(int keyCode, KeyEvent event)
272
+ {
273
+ if ((keyCode == KeyEvent.KEYCODE_BACK))
274
+ {
275
+ finish();
276
+ Intent intent = new Intent(this, HomepageActivity.class);
277
+ startActivity(intent);
278
+ }
279
+ return super.onKeyDown(keyCode, event);
280
+ }*/
270
281
}
Original file line number Diff line number Diff line change @@ -109,13 +109,7 @@ public void displayUserDetails() {
109
109
110
110
public static void logoutUser () {
111
111
//Parse method to log out by removing CurrentUser
112
- try {
113
- ParseUser currentUser = ParseUser .getCurrentUser ();
114
- currentUser .logOut ();
115
- }
116
- catch (Exception e ){
117
-
118
- }
112
+ ParseUser .logOut ();
119
113
}
120
114
121
115
//go to the profile screen
You can’t perform that action at this time.
0 commit comments