Search in sources :

Example 1 with TransitionDrawableGroup

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());
    }
}
Also used : TransitionDrawableGroup(org.mozilla.focus.animation.TransitionDrawableGroup) TransitionDrawable(android.graphics.drawable.TransitionDrawable) IWebView(org.mozilla.focus.web.IWebView)

Aggregations

TransitionDrawable (android.graphics.drawable.TransitionDrawable)1 TransitionDrawableGroup (org.mozilla.focus.animation.TransitionDrawableGroup)1 IWebView (org.mozilla.focus.web.IWebView)1