コード例 #1
0
ファイル: RouteFragment.java プロジェクト: haovn577/open
 @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);
 }
コード例 #2
0
ファイル: RouteFragment.java プロジェクト: haovn577/open
 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;
   }
 }
コード例 #3
0
ファイル: RouteFragment.java プロジェクト: haovn577/open
  @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));
    }
  }
コード例 #4
0
ファイル: RouteFragment.java プロジェクト: haovn577/open
 private void initDebugView(View view) {
   debugView = (DebugView) view.findViewById(R.id.debugging);
   if (act.isInDebugMode()) {
     debugView.setVisibility(View.VISIBLE);
   }
 }