From 90f149b51a07ea1bac87c8fc25d3a54a0f1ee82c Mon Sep 17 00:00:00 2001 From: bspeice Date: Sun, 8 Dec 2013 20:47:45 -0500 Subject: [PATCH] Display the toast correctly in the Registration page if internet is down --- src/com/uncc/gameday/activities/Registration.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/com/uncc/gameday/activities/Registration.java b/src/com/uncc/gameday/activities/Registration.java index 4f8c536..2d6e629 100644 --- a/src/com/uncc/gameday/activities/Registration.java +++ b/src/com/uncc/gameday/activities/Registration.java @@ -120,7 +120,11 @@ public class Registration extends MenuActivity { RegistrationClient client = new RegistrationClient(c); client.registerAttendee(a); } catch (RetrofitError e) { - Toast.makeText(c, R.string.internet_down_error, Toast.LENGTH_SHORT).show(); + runOnUiThread(new Thread(){ + public void run(){ + Toast.makeText(c, R.string.internet_down_error, Toast.LENGTH_SHORT).show(); + } + }); Log.e("Registration", e.getLocalizedMessage()); } }