Display the toast correctly in the Registration page if internet is down

This commit is contained in:
bspeice 2013-12-08 20:47:45 -05:00
parent 2a366c5e43
commit 90f149b51a

View File

@ -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());
}
}