@Override
 public void onResume() {
   super.onResume();
   // 在activity执行onResume时执行mMapView. onResume (),实现地图生命周期管理
   mMapView.onResume();
   MobclickAgent.onResume(this);
 }
Example #2
0
 @Override
 protected void onResume() {
   // TODO Auto-generated method stub
   super.onResume();
   mMapView.onResume();
   mLocationClient.start();
 }
Example #3
0
 @Override
 protected void onResume() {
   mMapView.onResume();
   if (mLocClient != null) {
     mLocClient.start();
   }
   super.onResume();
 }
Example #4
0
 // 注意在onResume、onDestroy和onPause中控制mapview和地图管理对象的状态
 @Override
 protected void onResume() {
   // TODO Auto-generated method stub
   mMapView.onResume();
   if (mMapManager != null) {
     mMapManager.start();
   }
   super.onResume();
 }
  @Override
  protected void onResume() {
    Log.v(Constant.TAG, "SetStarPlaceActivity:onResume");
    mapView.onResume();

    // LocationMode 跟随:FOLLOWING 普通:NORMAL 罗盘:COMPASS
    com.baidu.mapapi.map.MyLocationConfiguration.LocationMode currentMode =
        com.baidu.mapapi.map.MyLocationConfiguration.LocationMode.NORMAL;
    baiduMap.setMyLocationConfigeration(new MyLocationConfiguration(currentMode, true, null));
    InitLocation(
        com.baidu.location.LocationClientOption.LocationMode.Hight_Accuracy, "bd09ll", 5000, true);
    super.onResume();
  }
Example #6
0
  @Override
  protected void onResume() {

    mapView.onResume();
    super.onResume();
  }
 @Override
 public void onResume() {
   super.onResume();
   // 在activity执行onResume时执行mMapView. onResume (),实现地图生命周期管理
   mMapView.onResume();
 }
Example #8
0
 @Override
 protected void onResume() {
   // TODO Auto-generated method stub
   super.onResume();
   mapview.onResume();
 }
Example #9
0
  @Override
  protected void onResume() {

    Log.i(TAG, "[ACTIVITY] onResume");
    super.onResume();

    mMapView.onResume();
    if (mLocClient != null) {
      mLocClient.start();
    }

    mSettings = PreferenceManager.getDefaultSharedPreferences(this);
    mPedometerSettings = new PedometerSettings(mSettings);

    mUtils.setSpeak(mSettings.getBoolean("speak", false));

    // Read from preferences if the service was running on the last onPause
    mIsRunning = mPedometerSettings.isServiceRunning();

    // Start the service if this is considered to be an application start (last onPause was long
    // ago)
    if (!mIsRunning && mPedometerSettings.isNewStart()) {
      startStepService();
      bindStepService();
    } else if (mIsRunning) {
      bindStepService();
    }

    mPedometerSettings.clearServiceRunning();

    mStepValueView = (TextView) findViewById(R.id.step_value);
    mPaceValueView = (TextView) findViewById(R.id.pace_value);
    mDistanceValueView = (TextView) findViewById(R.id.distance_value);
    mSpeedValueView = (TextView) findViewById(R.id.speed_value);
    mCaloriesValueView = (TextView) findViewById(R.id.calories_value);
    mDesiredPaceView = (TextView) findViewById(R.id.desired_pace_value);

    mIsMetric = mPedometerSettings.isMetric();
    ((TextView) findViewById(R.id.distance_units))
        .setText(getString(mIsMetric ? R.string.kilometers : R.string.miles));
    ((TextView) findViewById(R.id.speed_units))
        .setText(getString(mIsMetric ? R.string.kilometers_per_hour : R.string.miles_per_hour));

    mMaintain = mPedometerSettings.getMaintainOption();
    ((LinearLayout) this.findViewById(R.id.desired_pace_control))
        .setVisibility(mMaintain != PedometerSettings.M_NONE ? View.VISIBLE : View.GONE);
    if (mMaintain == PedometerSettings.M_PACE) {
      mMaintainInc = 5f;
      mDesiredPaceOrSpeed = (float) mPedometerSettings.getDesiredPace();
    } else if (mMaintain == PedometerSettings.M_SPEED) {
      mDesiredPaceOrSpeed = mPedometerSettings.getDesiredSpeed();
      mMaintainInc = 0.1f;
    }
    Button button1 = (Button) findViewById(R.id.button_desired_pace_lower);
    button1.setOnClickListener(
        new View.OnClickListener() {
          public void onClick(View v) {
            mDesiredPaceOrSpeed -= mMaintainInc;
            mDesiredPaceOrSpeed = Math.round(mDesiredPaceOrSpeed * 10) / 10f;
            displayDesiredPaceOrSpeed();
            setDesiredPaceOrSpeed(mDesiredPaceOrSpeed);
          }
        });
    Button button2 = (Button) findViewById(R.id.button_desired_pace_raise);
    button2.setOnClickListener(
        new View.OnClickListener() {
          public void onClick(View v) {
            mDesiredPaceOrSpeed += mMaintainInc;
            mDesiredPaceOrSpeed = Math.round(mDesiredPaceOrSpeed * 10) / 10f;
            displayDesiredPaceOrSpeed();
            setDesiredPaceOrSpeed(mDesiredPaceOrSpeed);
          }
        });
    if (mMaintain != PedometerSettings.M_NONE) {
      ((TextView) findViewById(R.id.desired_pace_label))
          .setText(
              mMaintain == PedometerSettings.M_PACE
                  ? R.string.desired_pace
                  : R.string.desired_speed);
    }

    displayDesiredPaceOrSpeed();
  }
Example #10
0
 @Override
 protected void onResume() {
   if (mapView != null) mapView.onResume();
   super.onResume();
 }
Example #11
0
 public void onResume() {
   mMapView.onResume();
 }
 @Override
 protected void onResume() {
   /** MapView的生命周期与Activity同步,当activity恢复时需调用MapView.onResume() */
   mMapView.onResume();
   super.onResume();
 }