コード例 #1
0
  public void update(RoutingInfo info) {
    if (info == null) return;

    if (Framework.nativeGetRouter() == Framework.ROUTER_TYPE_VEHICLE) updateVehicle(info);
    else updatePedestrian(info);

    mTimeTotal.setText(
        RoutingController.formatRoutingTime(
            info.totalTimeInSeconds, R.dimen.text_size_routing_dimension));
    mDistanceTotal.setText(
        Utils.formatUnitsText(
            R.dimen.text_size_routing_number, R.dimen.text_size_routing_dimension,
            info.distToTarget, info.targetUnits));
    mTimeArrival.setText(RoutingController.formatArrivalTime(info.totalTimeInSeconds));
    UiUtils.setTextAndHideIfEmpty(mNextStreet, info.nextStreet);
    mRouteProgress.setProgress((int) info.completionPercent);
  }
コード例 #2
0
  @Override
  public void onDismiss(DialogInterface dialog) {
    if (mCancelled && mCancelRoute) RoutingController.get().cancel();

    super.onDismiss(dialog);
  }
コード例 #3
0
ファイル: RoutingPlanFragment.java プロジェクト: rokuz/omim
 @Override
 public boolean onBackPressed() {
   return RoutingController.get().cancelPlanning();
 }
コード例 #4
0
  public void updateNorth(double north) {
    if (!RoutingController.get().isNavigating()) return;

    mNorth = north;
    update(Framework.nativeGetRouteFollowingInfo());
  }