Beispiel #1
0
  @Override
  public void onWindowFocusChanged(boolean hasFocus) {
    super.onWindowFocusChanged(hasFocus);
    updateMapLocationButtons(mAppPrefs.getAutoPanMode());

    final View telemetryView = telemetryFragment.getView();
    if (telemetryView != null) {
      final int slidingDrawerWidth = telemetryView.getWidth();
      updateLocationButtonsMargin(isActionDrawerOpened(), slidingDrawerWidth);
    }
  }
Beispiel #2
0
  @Override
  public void onDrawerClosed() {
    super.onDrawerClosed();

    if (actionDrawerToggle != null) actionDrawerToggle.setActivated(false);

    if (telemetryFragment == null) return;
    final View telemetryView = telemetryFragment.getView();
    if (telemetryView != null) {
      final int slidingDrawerWidth = telemetryView.getWidth();
      final boolean isSlidingDrawerOpened = isActionDrawerOpened();
      updateLocationButtonsMargin(isSlidingDrawerOpened, slidingDrawerWidth);
    }
  }