com.google.android.apps.muzei.event.SwitchingPhotosStateChangedEvent

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

1. MuzeiActivity#resetProxyViewport()

Project: muzei
Source File: MuzeiActivity.java
View license
private void resetProxyViewport() {
    if (mWallpaperAspectRatio == 0 || mArtworkAspectRatio == 0) {
        return;
    }
    mDeferResetViewport = false;
    SwitchingPhotosStateChangedEvent spe = EventBus.getDefault().getStickyEvent(SwitchingPhotosStateChangedEvent.class);
    if (spe != null && spe.isSwitchingPhotos()) {
        mDeferResetViewport = true;
        return;
    }
    if (mPanScaleProxyView != null) {
        mPanScaleProxyView.setRelativeAspectRatio(mArtworkAspectRatio / mWallpaperAspectRatio);
    }
}

2. MuzeiActivity#onCreate()

Project: muzei
Source File: MuzeiActivity.java
View license
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.muzei_activity);
    mContainerView = (DrawInsetsFrameLayout) findViewById(R.id.container);
    setupArtDetailModeUi();
    setupIntroModeUi();
    setupTutorialModeUi();
    mContainerView.setOnInsetsCallback(new DrawInsetsFrameLayout.OnInsetsCallback() {

        @Override
        public void onInsetsChanged(Rect insets) {
            mChromeContainerView.setPadding(insets.left, insets.top, insets.right, insets.bottom);
            if (mTutorialContainerView != null) {
                mTutorialContainerView.setPadding(insets.left, insets.top, insets.right, insets.bottom);
            }
        }
    });
    showHideChrome(true);
    mSourceManager = SourceManager.getInstance(this);
    EventBus.getDefault().register(this);
    WallpaperSizeChangedEvent wsce = EventBus.getDefault().getStickyEvent(WallpaperSizeChangedEvent.class);
    if (wsce != null) {
        onEventMainThread(wsce);
    }
    ArtworkSizeChangedEvent asce = EventBus.getDefault().getStickyEvent(ArtworkSizeChangedEvent.class);
    if (asce != null) {
        onEventMainThread(asce);
    }
    ArtworkLoadingStateChangedEvent alsce = EventBus.getDefault().getStickyEvent(ArtworkLoadingStateChangedEvent.class);
    if (alsce != null) {
        onEventMainThread(alsce);
    }
    ArtDetailViewport fve = EventBus.getDefault().getStickyEvent(ArtDetailViewport.class);
    if (fve != null) {
        onEventMainThread(fve);
    }
    SwitchingPhotosStateChangedEvent spsce = EventBus.getDefault().getStickyEvent(SwitchingPhotosStateChangedEvent.class);
    if (spsce != null) {
        onEventMainThread(spsce);
    }
    getSupportLoaderManager().initLoader(0, null, mSourceLoaderCallbacks);
    getSupportLoaderManager().initLoader(1, null, mArtworkLoaderCallbacks);
}