@Override public void onUpdateDistance(int distanceToNextInstruction, int distanceToDestination) { debugView.setClosestDistance(route.getCurrentInstruction().getLiveDistanceToNext()); this.distanceToDestination.setDistance(distanceToDestination); this.distanceToDestination.setVisibility(View.VISIBLE); final View view = getPagerViewForIndex(pagerPositionWhenPaused); if (view != null) { final TextView currentInstructionDistance = (TextView) view.findViewById(R.id.distance_instruction); currentInstructionDistance.setText( DistanceFormatter.format(route.getCurrentInstruction().getLiveDistanceToNext(), true)); } }