Beispiel #1
0
 @Override
 public void onSnapLocation(Location originalLocation, Location snapLocation) {
   storeLocationInfo(originalLocation, snapLocation);
   manageMap(originalLocation, snapLocation);
   debugView.setCurrentLocation(originalLocation);
   debugView.setSnapLocation(snapLocation);
   debugView.setAverageSpeed(getAverageSpeed());
   logForDebugging(originalLocation, snapLocation);
 }
Beispiel #2
0
 private void showInstruction(int index) {
   if (isPaging) {
     final Instruction instruction = instructions.get(index);
     pagerPositionWhenPaused = index;
     Logger.logToDatabase(act, db, ROUTE_TAG, "paging to instruction: " + instruction.toString());
     pager.setCurrentItem(index);
     debugView.setClosestInstruction(instruction);
   } else {
     pagerPositionWhenPaused = index;
   }
 }
Beispiel #3
0
  @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));
    }
  }
Beispiel #4
0
 private void initDebugView(View view) {
   debugView = (DebugView) view.findViewById(R.id.debugging);
   if (act.isInDebugMode()) {
     debugView.setVisibility(View.VISIBLE);
   }
 }