當前位置: 首頁>>代碼示例>>Java>>正文


Java ArtDetailOpenedClosedEvent類代碼示例

本文整理匯總了Java中com.google.android.apps.muzei.event.ArtDetailOpenedClosedEvent的典型用法代碼示例。如果您正苦於以下問題:Java ArtDetailOpenedClosedEvent類的具體用法?Java ArtDetailOpenedClosedEvent怎麽用?Java ArtDetailOpenedClosedEvent使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ArtDetailOpenedClosedEvent類屬於com.google.android.apps.muzei.event包,在下文中一共展示了ArtDetailOpenedClosedEvent類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: maybeUpdateArtDetailOpenedClosed

import com.google.android.apps.muzei.event.ArtDetailOpenedClosedEvent; //導入依賴的package包/類
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
//                && !mArtworkLoading // uncomment when this wouldn't cause
//                                    // a zoom out / in visual glitch
                && (mWindowHasFocus)
                && !mPaused) {
            shouldBeOpened = true;
        }

        if (currentlyOpened != shouldBeOpened) {
            EventBus.getDefault().postSticky(new ArtDetailOpenedClosedEvent(shouldBeOpened));
        }
    }
 
開發者ID:chrislacy,項目名稱:AndroidLiveWallpaperHelloWorld,代碼行數:22,代碼來源:MuzeiActivity.java

示例2: onEventMainThread

import com.google.android.apps.muzei.event.ArtDetailOpenedClosedEvent; //導入依賴的package包/類
public void onEventMainThread(final ArtDetailOpenedClosedEvent e) {
    if (e.isArtDetailOpened() == mArtDetailMode) {
        return;
    }

    mArtDetailMode = e.isArtDetailOpened();
    cancelDelayedBlur();
    queueEvent(new Runnable() {
        @Override
        public void run() {
            mRenderer.setIsBlurred(!e.isArtDetailOpened(), true);
        }
    });
}
 
開發者ID:chrislacy,項目名稱:AndroidLiveWallpaperHelloWorld,代碼行數:15,代碼來源:MuzeiWallpaperService.java

示例3: onEventMainThread

import com.google.android.apps.muzei.event.ArtDetailOpenedClosedEvent; //導入依賴的package包/類
@Subscribe
public void onEventMainThread(final ArtDetailOpenedClosedEvent e) {
    if (e.isArtDetailOpened() == mArtDetailMode) {
        return;
    }

    mArtDetailMode = e.isArtDetailOpened();
    cancelDelayedBlur();
    queueEvent(() -> mRenderer.setIsBlurred(!e.isArtDetailOpened(), true));
}
 
開發者ID:romannurik,項目名稱:muzei,代碼行數:11,代碼來源:MuzeiWallpaperService.java

示例4: onStart

import com.google.android.apps.muzei.event.ArtDetailOpenedClosedEvent; //導入依賴的package包/類
@Override
public void onStart() {
    super.onStart();
    EventBus.getDefault().postSticky(new ArtDetailOpenedClosedEvent(true));
}
 
開發者ID:romannurik,項目名稱:muzei,代碼行數:6,代碼來源:ArtDetailFragment.java

示例5: onStop

import com.google.android.apps.muzei.event.ArtDetailOpenedClosedEvent; //導入依賴的package包/類
@Override
public void onStop() {
    super.onStop();
    mOverflowMenu.dismiss();
    EventBus.getDefault().postSticky(new ArtDetailOpenedClosedEvent(false));
}
 
開發者ID:romannurik,項目名稱:muzei,代碼行數:7,代碼來源:ArtDetailFragment.java


注:本文中的com.google.android.apps.muzei.event.ArtDetailOpenedClosedEvent類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。