private void applyMode(int mode, boolean animate, boolean force) { // apply to key buttons final float alpha = alphaForMode(mode); setKeyButtonViewQuiescentAlpha(NavbarEditor.NAVBAR_HOME, alpha, animate); setKeyButtonViewQuiescentAlpha(NavbarEditor.NAVBAR_RECENT, alpha, animate); setKeyButtonViewQuiescentAlpha(NavbarEditor.NAVBAR_CONDITIONAL_MENU, alpha, animate); setKeyButtonViewQuiescentAlpha(NavbarEditor.NAVBAR_ALWAYS_MENU, alpha, animate); setKeyButtonViewQuiescentAlpha(NavbarEditor.NAVBAR_MENU_BIG, alpha, animate); setKeyButtonViewQuiescentAlpha(mView.getSearchLight(), KEYGUARD_QUIESCENT_ALPHA, animate); setKeyButtonViewQuiescentAlpha(mView.getCameraButton(), KEYGUARD_QUIESCENT_ALPHA, animate); applyBackButtonQuiescentAlpha(mode, animate); // apply to lights out applyLightsOut(mode == MODE_LIGHTS_OUT, animate, force); }
public void applyBackButtonQuiescentAlpha(int mode, boolean animate) { float backAlpha = 0; backAlpha = maxVisibleQuiescentAlpha(backAlpha, mView.getSearchLight()); backAlpha = maxVisibleQuiescentAlpha(backAlpha, mView.getCameraButton()); backAlpha = maxVisibleQuiescentAlpha(backAlpha, mView.findViewWithTag(NavbarEditor.NAVBAR_HOME)); backAlpha = maxVisibleQuiescentAlpha(backAlpha, mView.findViewWithTag(NavbarEditor.NAVBAR_RECENT)); backAlpha = maxVisibleQuiescentAlpha( backAlpha, mView.findViewWithTag(NavbarEditor.NAVBAR_CONDITIONAL_MENU)); backAlpha = maxVisibleQuiescentAlpha(backAlpha, mView.findViewWithTag(NavbarEditor.NAVBAR_ALWAYS_MENU)); backAlpha = maxVisibleQuiescentAlpha(backAlpha, mView.findViewWithTag(NavbarEditor.NAVBAR_MENU_BIG)); if (backAlpha > 0) { setKeyButtonViewQuiescentAlpha(NavbarEditor.NAVBAR_BACK, backAlpha, animate); } }
@Override public void setContentVisible(boolean visible) { final float alpha = visible ? 1 : 0; fadeContent(mView.getCameraButton(), alpha); fadeContent(mView.getSearchLight(), alpha); }