use of org.mozilla.focus.animation.TransitionDrawableGroup in project focus-android by mozilla-mobile.
the class BrowserFragment method setBlockingEnabled.
public void setBlockingEnabled(boolean enabled) {
final IWebView webView = getWebView();
if (webView != null) {
webView.setBlockingEnabled(enabled);
}
statusBar.setBackgroundResource(enabled ? R.drawable.animated_background : R.drawable.animated_background_disabled);
if (!session.isCustomTab()) {
// Only update the toolbar background if this is not a custom tab. Custom tabs set their
// own color and we do not want to override this here.
urlBar.setBackgroundResource(enabled ? R.drawable.animated_background : R.drawable.animated_background_disabled);
backgroundTransitionGroup = new TransitionDrawableGroup((TransitionDrawable) urlBar.getBackground(), (TransitionDrawable) statusBar.getBackground());
} else {
backgroundTransitionGroup = new TransitionDrawableGroup((TransitionDrawable) statusBar.getBackground());
}
}
Aggregations