Changeset View
Changeset View
Standalone View
Standalone View
src/it/reyboz/bustorino/fragments/FragmentHelper.java
Show First 20 Lines • Show All 199 Lines • ▼ Show 20 Lines | public void stopLastRequestIfNeeded(){ | ||||
task.cancel(true); | task.cancel(true); | ||||
} | } | ||||
} | } | ||||
/** | /** | ||||
* Wrapper to show the errors/status that happened | * Wrapper to show the errors/status that happened | ||||
* @param res result from Fetcher | * @param res result from Fetcher | ||||
*/ | */ | ||||
public void showErrorMessage(Fetcher.result res){ | public void showErrorMessage(Fetcher.Result res){ | ||||
//TODO: implement a common set of errors for all fragments | //TODO: implement a common set of errors for all fragments | ||||
switch (res){ | switch (res){ | ||||
case OK: | case OK: | ||||
break; | break; | ||||
case CLIENT_OFFLINE: | case CLIENT_OFFLINE: | ||||
showToastMessage(R.string.network_error, true); | showToastMessage(R.string.network_error, true); | ||||
break; | break; | ||||
case SERVER_ERROR: | case SERVER_ERROR: | ||||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |
Public contents are in Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) or GNU Free Documentation License (at your option) unless otherwise noted. · Contact / Register