Advertisement
Guest User

Untitled

a guest
Mar 26th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.93 KB | None | 0 0
  1. Call<List<PointedRouteSection>> getPointsBySubgroupCall = restService.calculatePath(
  2.             routePoints.getStartPoint(),
  3.             routePoints.getEndPoint(),
  4.             routePoints.getIntermediatePoints());
  5.         getPointsBySubgroupCall.enqueue(new Callback<List<PointedRouteSection>>() {
  6.             @Override
  7.             public void onResponse(@NonNull Call<List<PointedRouteSection>> call,
  8.                                    @NonNull Response<List<PointedRouteSection>> response) {
  9.                 pointedRouteSections.addAll(response.body());
  10.                 calculatedPathRecyclerViewAdapter.notifyDataSetChanged();
  11.                 updateRouteScore();
  12.             }
  13.  
  14.             @Override
  15.             public void onFailure(@NonNull Call<List<PointedRouteSection>> call,
  16.                                   @NonNull Throwable t) {
  17.                 Toast.makeText(getApplicationContext(), "Fail!", Toast.LENGTH_LONG).show();
  18.             }
  19.         });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement