com.google.android.apps.muzei.event.ArtDetailOpenedClosedEvent

Here are the examples of the java api class com.google.android.apps.muzei.event.ArtDetailOpenedClosedEvent taken from open source projects.

1. MuzeiActivity#maybeUpdateArtDetailOpenedClosed()

Project: muzei
Source File: MuzeiActivity.java
View license
private void maybeUpdateArtDetailOpenedClosed() {
    boolean currentlyOpened = false;
    ArtDetailOpenedClosedEvent adoce = EventBus.getDefault().getStickyEvent(ArtDetailOpenedClosedEvent.class);
    if (adoce != null) {
        currentlyOpened = adoce.isArtDetailOpened();
    }
    boolean shouldBeOpened = false;
    if (mUiMode == UI_MODE_ART_DETAIL && //                                    // a zoom out / in visual glitch
    (mWindowHasFocus || mOverflowMenuVisible) && !mPaused) {
        shouldBeOpened = true;
    }
    if (currentlyOpened != shouldBeOpened) {
        EventBus.getDefault().postSticky(new ArtDetailOpenedClosedEvent(shouldBeOpened));
    }
}