@Override
  public void onWindowFocusChanged(final boolean pHasWindowFocus) {
    super.onWindowFocusChanged(pHasWindowFocus);

    if (pHasWindowFocus) {
      if (this.mPaused) {
        this.doResume();
      }
      this.mHasWindowFocused = true;
    } else {
      if (!this.mPaused) {
        this.doPause();
      }
      this.mHasWindowFocused = false;
    }
  }
  @Override
  public void onWindowFocusChanged(boolean focus) {
    super.onWindowFocusChanged(focus);

    if (orientation != getScreenOrientation()) {
      orientation = getScreenOrientation();
      /*if(orientation == Configuration.ORIENTATION_LANDSCAPE){
          LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(screenWidth, vehicleImg.getHeight()); //(screenHeight - mToolBar.getHeight()) * 95 / 100
          vehicleImg.setLayoutParams(params);
      }*/
      orientationWasChanged = true;
      if (allImagesDownloaded()) {
        // setImage(imageVehicles.get(currentAngle / ANGLE_PER_ROTATION).getUrl(), false);
        setImageTouchListener();
      } else {
        setFirstImageThread();
        checkForCompleteDownloadThread();
      }
    }
  }