Exemplo n.º 1
0
 @Override
 public void onRouteComplete() {
   pager.setCurrentItem(instructions.size() - 1);
   voiceNavigationController.playInstruction(instructions.get(instructions.size() - 1));
   distanceToDestination.setDistance(0);
   footerWrapper.setVisibility(View.GONE);
 }
Exemplo n.º 2
0
 public void turnAutoPageOff() {
   if (isPaging) {
     pagerPositionWhenPaused = pager.getCurrentItem();
   }
   isPaging = false;
   resume.setVisibility(View.VISIBLE);
   voiceNavigationController.mute();
 }
Exemplo n.º 3
0
 public void resumeAutoPaging() {
   pager.setCurrentItem(pagerPositionWhenPaused);
   setCurrentPagerItemStyling(pagerPositionWhenPaused);
   setPerspectiveForCurrentInstruction();
   resume.setVisibility(View.GONE);
   currentXCor = mapFragment.getMap().getMapPosition().getX();
   isPaging = true;
   voiceNavigationController.unmute();
 }
Exemplo n.º 4
0
 @Override
 public void onInstructionComplete(int index) {
   if (isPaging) {
     voiceNavigationController.playFlippedInstruction(instructions.get(index));
     if (isLastInstructionBeforeDestination(index)) {
       flipInstruction(index);
     } else if (hasNextInstruction(index)) {
       showInstruction(index + 1);
     }
   } else {
     pagerPositionWhenPaused = index + 1;
   }
 }
Exemplo n.º 5
0
 @Override
 public void onApproachInstruction(int index) {
   if (index < instructions.size() - 1) {
     voiceNavigationController.playInstruction(instructions.get(index));
   }
 }
Exemplo n.º 6
0
 @Override
 public void onRecalculate(Location location) {
   createRouteTo(location);
   voiceNavigationController.recalculating();
   displayRecalculatePagerView();
 }