src/main/java/de/blau/android/util/Util.java
/**
     * Display a toast if we got an IOException downloading
     * 
     * @param activity the calling Activity
     * @param iox the IOException
     */
Display a toast if we got an IOException downloading

@param activity the calling Activity
@param iox the IOException
Display a toast if we got an IOException downloading @param activity the calling Activity @param iox the IOException
public static void toastDowloadError(@NonNull final FragmentActivity activity, @NonNull final IOException iox) {
        activity.runOnUiThread(() -> {
            if (iox instanceof OsmServerException) {
                Snack.toastTopWarning(activity,
                        activity.getString(R.string.toast_download_failed, ((OsmServerException) iox).getErrorCode(), iox.getMessage()));
            } else {
                Snack.toastTopWarning(activity, activity.getString(R.string.toast_server_connection_failed, iox.getMessage()));
            }
        });
    }
public static void toastDowloadError ( @ NonNull final FragmentActivity activity , @ NonNull final IOException iox ) { activity . runOnUiThread ( ( ) -> { if ( iox instanceof OsmServerException ) { Snack . toastTopWarning ( activity , activity . getString ( R . string . toast_download_failed , ( ( OsmServerException ) iox ) . getErrorCode ( ) , iox . getMessage ( ) ) ) ; } else { Snack . toastTopWarning ( activity , activity . getString ( R . string . toast_server_connection_failed , iox . getMessage ( ) ) ) ; } } ) ; }
Display a toast if we got an IOException downloading
Display a toast if we got an IOException downloading