本文整理匯總了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));
}
}
示例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);
}
});
}
示例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));
}
示例4: onStart
import com.google.android.apps.muzei.event.ArtDetailOpenedClosedEvent; //導入依賴的package包/類
@Override
public void onStart() {
super.onStart();
EventBus.getDefault().postSticky(new ArtDetailOpenedClosedEvent(true));
}
示例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));
}