@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); } }
@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); } }