コード例 #1
0
ファイル: FlightActivity.java プロジェクト: meenky/Tower
  @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);
    }
  }
コード例 #2
0
ファイル: FlightActivity.java プロジェクト: meenky/Tower
  @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);
    }
  }